Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

Commit

Permalink
fix(repos): catch correct exception on missing repository
Browse files Browse the repository at this point in the history
  • Loading branch information
gjuro87 authored and aexvir committed Jul 22, 2021
1 parent 2070434 commit 486edf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zoo/repos/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_gitlab_envs(request):

try:
repo = Repository.objects.get(id=project_id, provider=Provider.GITLAB.value)
except RepositoryNotFoundError:
except Repository.DoesNotExist:
return JsonResponse({"message": "Wrong project_id"}, safe=False)

return JsonResponse(
Expand Down

0 comments on commit 486edf1

Please sign in to comment.