mirror of
https://github.com/whippyshou/mastodon
synced 2024-11-28 23:09:12 +09:00
Fix error when scheduled_at
attribute is malformed (#9866)
This commit is contained in:
parent
7c3fddeab4
commit
6ca9015789
@ -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…
Reference in New Issue
Block a user