diff --git a/app/controllers/officing/polls_controller.rb b/app/controllers/officing/polls_controller.rb index e122284ec..ba2a5c01a 100644 --- a/app/controllers/officing/polls_controller.rb +++ b/app/controllers/officing/polls_controller.rb @@ -6,10 +6,11 @@ class Officing::PollsController < Officing::BaseController end def final - @polls = current_user.poll_officer? ? current_user.poll_officer.final_days_assigned_polls : [] - return unless current_user.poll_officer? - - @polls = @polls.select {|poll| poll.ends_at > 1.week.ago && poll.expired?} + @polls = if current_user.poll_officer? + current_user.poll_officer.final_days_assigned_polls.select {|poll| poll.ends_at > 1.week.ago && poll.expired?} + else + [] + end end -end \ No newline at end of file +end