FIX: if poll has not options do not break serializer
Note: we have a proper rewrite of this plugin in progress it will address this issue in a proper way
This commit is contained in:
parent
64aca0dc1b
commit
29fdb50338
|
@ -414,6 +414,7 @@ after_initialize do
|
|||
polls = post_custom_fields[DiscoursePoll::POLLS_CUSTOM_FIELD].dup
|
||||
|
||||
polls.each do |_, poll|
|
||||
next if !poll
|
||||
poll["options"].each do |option|
|
||||
option.delete("voter_ids")
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue