From e1462211a01709594bb5bed6ffa758380c72ec9a Mon Sep 17 00:00:00 2001 From: Rogelio Mita Date: Wed, 26 Jun 2013 15:02:29 +0000 Subject: BugFix: miss pollsters when change to closed to open --- diff --git a/webapp/polls/forms.py b/webapp/polls/forms.py index 653789b..7de219d 100644 --- a/webapp/polls/forms.py +++ b/webapp/polls/forms.py @@ -66,9 +66,12 @@ class PollForm(forms.Form): # any type of mongo document poll = Poll.get(id) old_data = poll.to_python(with_dates=True) - print old_data + + if len(poll.pollsters) and poll.status == Poll.CLOSED: + if "pollsters" in _data.keys(): + del _data['pollsters'] + old_data.update(_data) - print old_data _data = old_data poll = Poll(data=_data) -- cgit v0.9.1