Skip to content

Commit

Permalink
fix: Delete entity type API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
beygorghor authored Nov 15, 2024
2 parents 856d0d5 + 24fdfca commit 8eaf44c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions iaso/api/entity_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ def destroy(self, request, pk=None, *args, **kwargs):
if not request.user.has_perm(permission.ENTITY_TYPE_WRITE):
return Response(status=status.HTTP_403_FORBIDDEN)

obj = get_object_or_404(pk=pk)

obj = get_object_or_404(EntityType, pk=pk)
obj.delete()

return Response(status=status.HTTP_204_NO_CONTENT)

0 comments on commit 8eaf44c

Please sign in to comment.