From 0b5eed090e8b680074d49ff6a439d43316e613a5 Mon Sep 17 00:00:00 2001 From: Bertocq Date: Mon, 16 Oct 2017 19:54:07 +0200 Subject: [PATCH] Fix no-answer scenario for question valid answers --- app/models/poll/question.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/poll/question.rb b/app/models/poll/question.rb index efcaf4635..90e528bd0 100644 --- a/app/models/poll/question.rb +++ b/app/models/poll/question.rb @@ -40,7 +40,7 @@ class Poll::Question < ActiveRecord::Base end def valid_answers - (super.try(:split, ',').compact || []).map(&:strip) + (super.try(:split, ',')&.compact || []).map(&:strip) end def copy_attributes_from_proposal(proposal)