Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of https://github.com/rmorell/hd-vote

  • Loading branch information...
commit ef93a3f8e8f873c0410bf9e2d1fb4492643ff0ac 2 parents 2bf4573 + faee6ea
@dustball dustball authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  main.py
  2. +2 −2 models.py
View
2  main.py
@@ -101,7 +101,7 @@ def post(self,urlcode):
self.response.out.write(template.render('templates/edit.html', locals()))
else:#otherwise we are saving changes
- if issue.vote_count:
+ if issue.vote_count():
raise Exception('Unable to change issue text once votes have been cast')
duration_amount = int(self.request.get('duration_amount'))
View
4 models.py
@@ -40,7 +40,7 @@ def vote_for_member(self,member=None):
return self.votes.filter('member =',member).get()
def register_vote(self,choice,member=None):
- if self.has_results:
+ if self.has_results():
raise Exception('Cannot vote in closed polls.')
if not member:
member = users.get_current_user()
@@ -61,7 +61,7 @@ def register_vote(self,choice,member=None):
def extend_duration(self,hours):
if hours <= 0:
raise Exception('Negative extensions are not valid.')
- if self.has_results:
+ if self.has_results():
raise Exception('Cannot extend closed polls.')
self.duration += hours
if self.start_time:
Please sign in to comment.
Something went wrong with that request. Please try again.