From 0c43c320dbae8f72f5f5c40e7a7944196cce368a Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 5 Mar 2019 15:21:31 +0100 Subject: [PATCH] Fix status creation API silently discarding invalid poll (#10171) --- app/models/status.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/status.rb b/app/models/status.rb index 74deeeb50..f33130dd6 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -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 }