Fix detailed poll validation errors not being returned in the API (#10261)
No more "Owned poll is invalid"
This commit is contained in:
parent
c20d096e6a
commit
3ad3223b46
3 changed files with 14 additions and 10 deletions
|
@ -71,7 +71,8 @@ class Status < ApplicationRecord
|
|||
validates_with DisallowedHashtagsValidator
|
||||
validates :reblog, uniqueness: { scope: :account }, if: :reblog?
|
||||
validates :visibility, exclusion: { in: %w(direct limited) }, if: :reblog?
|
||||
validates_associated :owned_poll
|
||||
|
||||
accepts_nested_attributes_for :owned_poll
|
||||
|
||||
default_scope { recent }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue