diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-03-15 13:36:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-15 13:36:38 +0100 |
commit | 3ad3223b466d8afbe8d11160a7351b34fe12c97a (patch) | |
tree | bc42e2dd461279c7d707535a6fa717f5015bf94b /app/models | |
parent | c20d096e6a251e1b84ac47b751d2eb065743dbc2 (diff) |
Fix detailed poll validation errors not being returned in the API (#10261)
No more "Owned poll is invalid"
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/status.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/status.rb b/app/models/status.rb index d029ff3cd..571167943 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -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 } |