diff --git a/contests/handlers/counter.py b/contests/handlers/counter.py index 4f6c1a1..e36b2f5 100644 --- a/contests/handlers/counter.py +++ b/contests/handlers/counter.py @@ -143,7 +143,7 @@ def get_context(self, request): profile=request.user.profile ).user_status == 'G' else False - if request.method == 'POST': + if manager and request.method == 'POST' and request.POST.get('user_id'): success = self.reset_participant(request) else: success = False @@ -165,5 +165,5 @@ def reset_participant(self, request): contest=self.contest, participant=Participant.objects.get(contest=self.contest, local_id=participant_id) ).update(last_evaluation=None) - return True if participant.count() > 0 else False + return True if participant > 0 else False