Skip to content

Commit 78eeeb2

Browse files
authored
Add check to filter out disabled challenges for create/update challenge (Cloud-CV#4766)
This PR adds a check to the method that creates or updates a GitHub challenge to filter out the disabled challenges so that the hosts are unable to update them. This is needed because of a recent issue with duplicate challenges being created on multiple updates of the same challenge.
1 parent 0870651 commit 78eeeb2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/challenges/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3899,7 +3899,7 @@ def create_or_update_github_challenge(request, challenge_host_team_pk):
38993899
return Response(response_data, status=status.HTTP_406_NOT_ACCEPTABLE)
39003900

39013901
challenge_queryset = Challenge.objects.filter(
3902-
github_repository=request.data["GITHUB_REPOSITORY"],
3902+
github_repository=request.data["GITHUB_REPOSITORY"], is_disabled=False
39033903
)
39043904

39053905
if challenge_queryset:

0 commit comments

Comments
 (0)