Skip to content
Snippets Groups Projects
Unverified Commit 6ca90157 authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

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

parent 7c3fddea
No related branches found
No related tags found
No related merge requests found
......@@ -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!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment