Permalink
Browse files

Do not initialize the vote value of a new Vote

 o We set the vote value for any vote, existing or newly-created, anyway
  • Loading branch information...
1 parent 09c5a3a commit a1ab7735f64b5bc3648e1275c7e5bfab1bfb51b6 Apollon Oikonomopoulos committed Oct 31, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 grrbl/views.py
View
@@ -59,7 +59,7 @@ def vote(request, object_type, object_id):
# Subtract the previous vote value
objekt.votes -= vote.vote
except Vote.DoesNotExist:
- vote = Vote(user=request.user, item=objekt, vote=int(request.POST['vote']))
+ vote = Vote(user=request.user, item=objekt)
vote.vote = vote_value
objekt.votes += vote_value

0 comments on commit a1ab773

Please sign in to comment.