workaround, we need another lazy operator here

Data can be pretty inconsistent here till our big refactor is done
This commit is contained in:
Sam 2018-08-20 10:37:06 +10:00
parent 4486e238d1
commit a71fe16647
1 changed files with 1 additions and 1 deletions

View File

@ -281,7 +281,7 @@ after_initialize do
user_hash = UserNameSerializer.new(user).serializable_hash user_hash = UserNameSerializer.new(user).serializable_hash
# protect against poorly denormalized data # protect against poorly denormalized data
poll_votes.dig(user.id.to_s, poll_name)&.each do |option_id| poll_votes&.dig(user.id.to_s, poll_name)&.each do |option_id|
if (params[:option_id]) if (params[:option_id])
next unless option_id == params[:option_id].to_s next unless option_id == params[:option_id].to_s
end end