Skip to content

Commit

Permalink
Fix tag deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
sigaloid committed Apr 24, 2024
1 parent ea50001 commit 24e9621
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/scopeBackend/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@ def delete(self, request):
if not workspace:
return Response({'error':'Workspace does not exist'}, status=status.HTTP_404_NOT_FOUND)
# check if tag exists
if not Tag.objects.filter(workspace=workspace, tag=tag):
tag = Tag.objects.filter(workspace=workspace, tag=tag)
if not tag:
return Response({'error':'Tag does not exist'}, status=status.HTTP_404_NOT_FOUND)
# delete tag
tag.delete()
Expand Down

0 comments on commit 24e9621

Please sign in to comment.