From 7174fc1066ed58070eee032a05a25d136f4dc717 Mon Sep 17 00:00:00 2001 From: Zhao-Linux Date: Thu, 17 Nov 2022 16:09:28 +0700 Subject: [PATCH] fix bugs --- judge/views/pagevote.py | 4 ---- templates/contest/contest.html | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/judge/views/pagevote.py b/judge/views/pagevote.py index 5816b03..a7f9a9f 100644 --- a/judge/views/pagevote.py +++ b/judge/views/pagevote.py @@ -71,10 +71,6 @@ def vote_page(request, delta): except PageVoteVoter.DoesNotExist: # We must continue racing in case this is exploited to manipulate votes. continue - if -vote.score != delta: - return HttpResponseBadRequest( - _("You already voted."), content_type="text/plain" - ) vote.delete() PageVote.objects.filter(id=pagevote_id).update( score=F("score") - vote.score diff --git a/templates/contest/contest.html b/templates/contest/contest.html index e7d8e8a..cb35c3e 100644 --- a/templates/contest/contest.html +++ b/templates/contest/contest.html @@ -18,7 +18,7 @@ {% include "contest/media-js.html" %} {% include "comments/media-js.html" %} - {% include "actionbar/media-css.html" %} + {% include "actionbar/media-js.html" %} {% endblock %} {% block content_media %}