Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Fix error when scheduled_at attribute is malformed (mastodon#9866)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored Jan 19, 2019
1 parent 7c3fdde commit 6ca9015
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/services/post_status_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def preprocess_attributes!
@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!
Expand Down

0 comments on commit 6ca9015

Please sign in to comment.