1
0
Fork 0
forked from fedi/mastodon

Fix status creation API silently discarding invalid poll (#10171)

This commit is contained in:
Eugen Rochko 2019-03-05 15:21:31 +01:00 committed by GitHub
parent df5924a1db
commit 0c43c320db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 }