diff options
author | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-07-22 15:51:06 (GMT) |
---|---|---|
committer | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-07-22 17:52:10 (GMT) |
commit | 1fae6f21dc0ad0225b929a8c73e28a84d791d1a2 (patch) | |
tree | 06985af0d23565c2709954df3179263c5ba45b2b | |
parent | da97c68d88d494068b206025f51e3d5926bfa6c9 (diff) |
ignore restriction to download a poll open when user is manager
-rw-r--r-- | webapp/polls/views.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/webapp/polls/views.py b/webapp/polls/views.py index b52b891..9a5a631 100644 --- a/webapp/polls/views.py +++ b/webapp/polls/views.py @@ -273,12 +273,11 @@ def download_poll(request, poll_id=None): poll = Poll.get(id=_id) if not _id or not poll: raise Http404() - elif poll and poll.is_open(): - raise Http404() - if not request.user.is_pollster: + if request.user.is_pollster: # In here, somebody is downloading a poll, but is not a pollster. - pass + if poll and poll.is_open(): + raise Http404() file_name = datetime.now().strftime("%d_%m_%Y_%H_%M_%S") |