mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00
FIX: Copy old status to new poll. (#6788)
This commit is contained in:

committed by
Régis Hanol

parent
f5c4ab0573
commit
c928386c3e
@ -37,6 +37,7 @@ module DiscoursePoll
|
||||
attributes = new_poll.slice(*POLL_ATTRIBUTES)
|
||||
attributes["visibility"] = new_poll["public"] == "true" ? "everyone" : "secret"
|
||||
attributes["close_at"] = Time.zone.parse(new_poll["close"]) rescue nil
|
||||
attributes["status"] = old_poll["status"]
|
||||
poll = ::Poll.new(attributes)
|
||||
|
||||
if is_different?(old_poll, poll, new_poll_options)
|
||||
|
Reference in New Issue
Block a user