Преглед изворни кода

Fix error when `scheduled_at` attribute is malformed (#9866)

master
Eugen Rochko пре 5 година
committed by GitHub
родитељ
комит
6ca9015789
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 измењених фајлова са 2 додато и 0 уклоњено
  1. +2
    -0
      app/services/post_status_service.rb

+ 2
- 0
app/services/post_status_service.rb Прегледај датотеку

@@ -49,6 +49,8 @@ class PostStatusService < BaseService
@visibility = :unlisted if @visibility == :public && @account.silenced
@scheduled_at = @options[:scheduled_at]&.to_datetime
@scheduled_at = nil if scheduled_in_the_past?
rescue ArgumentError
raise ActiveRecord::RecordInvalid
end

def process_status!


Loading…
Откажи
Сачувај