Skip to content

Commit

Permalink
delete commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
gabeweng committed Nov 8, 2024
1 parent d5e4b6c commit ed2f2fb
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions backend/clubs/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit ed2f2fb

Please sign in to comment.