Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRogelio Mita <rogeliomita@activitycentral.com>2013-06-26 15:02:29 (GMT)
committer Rogelio Mita <rogeliomita@activitycentral.com>2013-06-26 15:02:29 (GMT)
commite1462211a01709594bb5bed6ffa758380c72ec9a (patch)
tree2a1424fa4f73824ae5c8a4035d7d7eb19092dffe
parent783def725a6597d537b4f3bf05f3e8ce4ef8969a (diff)
BugFix: miss pollsters when change to closed to open
-rw-r--r--webapp/polls/forms.py7
1 files changed, 5 insertions, 2 deletions
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)