diff --git a/apps/assets/api/node.py b/apps/assets/api/node.py index fbdebabc5..a48d5f00d 100644 --- a/apps/assets/api/node.py +++ b/apps/assets/api/node.py @@ -62,11 +62,8 @@ class NodeViewSet(OrgModelViewSet): def destroy(self, request, *args, **kwargs): node = self.get_object() if node.has_children_or_contains_assets(): - msg = _("Deletion failed " - "and the node contains children or assets") - return Response( - data={'msg': msg}, status=status.HTTP_500_INTERNAL_SERVER_ERROR - ) + msg = _("Deletion failed and the node contains children or assets") + return Response(data={'msg': msg}, status=status.HTTP_403_FORBIDDEN) return super().destroy(request, *args, **kwargs)