From f05ca02f13c3af0467cae2295fa194102fa7d7d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Tue, 5 Jun 2018 15:49:21 +0200 Subject: [PATCH] FIX: unable to add new poll to post with a public poll --- plugins/poll/lib/polls_updater.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/poll/lib/polls_updater.rb b/plugins/poll/lib/polls_updater.rb index 8fa46c698f6..50a4bb81b44 100644 --- a/plugins/poll/lib/polls_updater.rb +++ b/plugins/poll/lib/polls_updater.rb @@ -114,10 +114,10 @@ module DiscoursePoll private def self.private_to_public_poll?(post, previous_polls, current_polls, poll_name) - _previous_poll = previous_polls[poll_name] - current_poll = current_polls[poll_name] + previous_poll = previous_polls[poll_name] + current_poll = current_polls[poll_name] - if previous_polls["public"].nil? && current_poll["public"] == "true" + if previous_poll["public"].nil? && current_poll["public"] == "true" error = poll_name == DiscoursePoll::DEFAULT_POLL_NAME ? I18n.t("poll.default_cannot_be_made_public") : I18n.t("poll.named_cannot_be_made_public", name: poll_name)