Skip to content

Commit

Permalink
fix(workspaces): properly rename deleted workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
sigaloid committed Nov 4, 2024
1 parent 04c54ff commit dc18941
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/scopeBackend/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,9 @@ def delete(self, request):
if workspace.creatorId != self.request.user:
return Response({'error':'Only the workspace creator can delete'}, status=status.HTTP_403_FORBIDDEN)
# workspace.delete()
#workspace.hidden = True
workspace.hidden = True
workspace.name = workspace.name + "_deleted_" + __import__('os').urandom(15).hex()
workspace.save()
return Response('Workspace has been deleted', status=status.HTTP_200_OK)

# accessible at /api/workspaces/ [POST]
Expand Down

0 comments on commit dc18941

Please sign in to comment.