Skip to content

Commit

Permalink
Address review
Browse files Browse the repository at this point in the history
  • Loading branch information
amickan committed Dec 18, 2024
1 parent 44df626 commit 2bb9fec
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/grandchallenge/evaluation/views/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ class UserCanSubmitAlgorithmToPhaseMixin(VerificationRequiredMixin):

def dispatch(self, request, *args, **kwargs):
if not (
self.phase.challenge.is_admin(self.request.user)
or self.phase.challenge.is_participant(self.request.user)
self.phase.challenge.is_admin(request.user)
or self.phase.challenge.is_participant(request.user)
):
error_message = (
"You need to be either an admin or a participant of "
Expand All @@ -112,8 +112,8 @@ def dispatch(self, request, *args, **kwargs):
)
return self.handle_no_permission()
elif (
self.phase.challenge.is_participant(self.request.user)
and not self.phase.challenge.is_admin(self.request.user)
self.phase.challenge.is_participant(request.user)
and not self.phase.challenge.is_admin(request.user)
and not self.phase.open_for_submissions
):
error_message = "The phase is currently not open for submissions. Please come back later."
Expand Down Expand Up @@ -154,8 +154,8 @@ def dispatch(self, request, *args, **kwargs):
error_message,
)
return self.handle_no_permission()

return super().dispatch(request, *args, **kwargs)
else:
return super().dispatch(request, *args, **kwargs)


class PhaseCreate(
Expand Down

0 comments on commit 2bb9fec

Please sign in to comment.