Skip to content

Commit

Permalink
Fix status creation API silently discarding invalid poll (mastodon#10171
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Gargron authored Mar 5, 2019
1 parent bc30e28 commit ca966aa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class Status < ApplicationRecord
validates_with StatusLengthValidator
validates_with DisallowedHashtagsValidator
validates :reblog, uniqueness: { scope: :account }, if: :reblog?
validates_associated :owned_poll

default_scope { recent }

Expand Down

0 comments on commit ca966aa

Please sign in to comment.