From ed2f2fb836375fd342c50db681df96380f6acf8c Mon Sep 17 00:00:00 2001 From: Gabriel Date: Thu, 7 Nov 2024 21:34:25 -0500 Subject: [PATCH] delete commented out code --- backend/clubs/views.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/backend/clubs/views.py b/backend/clubs/views.py index 86d21926a..4b71c1b46 100644 --- a/backend/clubs/views.py +++ b/backend/clubs/views.py @@ -3831,18 +3831,6 @@ def create(self, request, *args, **kwargs): If a ownership request object already exists, reuse it. """ club = request.data.get("club", None) - """ - obj = OwnershipRequest.objects.filter( - club__code=club, requester=request.user - ).first() - if obj is not None: - obj.withdrawn = False - obj.created_at = timezone.now() - obj.save(update_fields=["withdrawn", "created_at"]) - return Response(UserOwnershipRequestSerializer(obj).data) - - return super().create(request, *args, **kwargs) - """ club_instance = Club.objects.get(code=club) create_defaults = {"club": club_instance, "requester": request.user} @@ -3872,7 +3860,7 @@ def destroy(self, request, *args, **kwargs): obj.withdrawn = True obj.save(update_fields=["withdrawn"]) - return Response(status=status.HTTP_204_NO_CONTENT) + return Response({"success": True}) def get_queryset(self): return OwnershipRequest.objects.filter(