diff --git a/plugins/poll/plugin.rb b/plugins/poll/plugin.rb index c3f2f901bd3..017ea72a81a 100644 --- a/plugins/poll/plugin.rb +++ b/plugins/poll/plugin.rb @@ -312,12 +312,14 @@ after_initialize do # only care when raw has changed! return unless self.raw_changed? || force - validator = DiscoursePoll::PostValidator.new(self) - return unless validator.validate_post - validator = DiscoursePoll::PollsValidator.new(self) return unless (polls = validator.validate_polls) + if !polls.empty? + validator = DiscoursePoll::PostValidator.new(self) + return unless validator.validate_post + end + # are we updating a post? if self.id.present? DistributedMutex.synchronize("#{PLUGIN_NAME}-#{self.id}") do