Skip to content

Commit

Permalink
Merge pull request #404 from PROCOLLAB-github/fix/leave-project
Browse files Browse the repository at this point in the history
fixed leave
  • Loading branch information
sh1nkey authored Jul 22, 2024
2 parents 181c4d5 + 92e747d commit 979c18a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions projects/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,11 +543,7 @@ def delete(self, request, project_pk: int) -> Response:
project_id=project_pk,
user_id=current_user_id,
)
project = (
Project.objects.select_related("leader")
.get(id=project_pk)
.select_related("leader")
)
project = Project.objects.select_related("leader").get(id=project_pk)
if project.leader.id == current_user_id:
return Response(
{
Expand Down

0 comments on commit 979c18a

Please sign in to comment.