mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
workaround, we need another lazy operator here
Data can be pretty inconsistent here till our big refactor is done
This commit is contained in:
@ -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
|
||||||
|
Reference in New Issue
Block a user