diff options
author | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-06-19 22:58:18 (GMT) |
---|---|---|
committer | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-06-19 22:58:18 (GMT) |
commit | 8b4749553362855b417e337bbf8b03bcf8e0101f (patch) | |
tree | 03efc7c3577f288fce4d0cc8c87c7d3e6c8228ca | |
parent | f8db38aa3cfc02713bc6e31cb211311a9d94208f (diff) |
BugFix: merge results in web app
-rw-r--r-- | webapp/polls/models.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/webapp/polls/models.py b/webapp/polls/models.py index f4d9153..cc70f15 100644 --- a/webapp/polls/models.py +++ b/webapp/polls/models.py @@ -1181,11 +1181,10 @@ class PollResult(AbstractObject): if poll_result_data: inc_poll_result = PollResult(data=[self._data, poll_result_data]) inc_poll_result.validate() - if inc_poll_result.id: - poll_result_id = get_db().poll_results.update( - {'_id': inc_poll_result.id}, - inc_poll_result.to_python() - ) + poll_result_id = get_db().poll_results.update( + {'_id': poll_result_data['_id']}, + inc_poll_result.to_python() + ) else: poll_result_id = get_db().poll_results.save(self.to_python()) |