fix bugs
This commit is contained in:
parent
b75a52fe74
commit
7174fc1066
2 changed files with 1 additions and 5 deletions
|
@ -71,10 +71,6 @@ def vote_page(request, delta):
|
||||||
except PageVoteVoter.DoesNotExist:
|
except PageVoteVoter.DoesNotExist:
|
||||||
# We must continue racing in case this is exploited to manipulate votes.
|
# We must continue racing in case this is exploited to manipulate votes.
|
||||||
continue
|
continue
|
||||||
if -vote.score != delta:
|
|
||||||
return HttpResponseBadRequest(
|
|
||||||
_("You already voted."), content_type="text/plain"
|
|
||||||
)
|
|
||||||
vote.delete()
|
vote.delete()
|
||||||
PageVote.objects.filter(id=pagevote_id).update(
|
PageVote.objects.filter(id=pagevote_id).update(
|
||||||
score=F("score") - vote.score
|
score=F("score") - vote.score
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
</script>
|
</script>
|
||||||
{% include "contest/media-js.html" %}
|
{% include "contest/media-js.html" %}
|
||||||
{% include "comments/media-js.html" %}
|
{% include "comments/media-js.html" %}
|
||||||
{% include "actionbar/media-css.html" %}
|
{% include "actionbar/media-js.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content_media %}
|
{% block content_media %}
|
||||||
|
|
Loading…
Reference in a new issue