Skip to content

Commit

Permalink
Merge pull request #403 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 ac31a7c + f45927b commit 181c4d5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion projects/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,11 @@ def delete(self, request, project_pk: int) -> Response:
project_id=project_pk,
user_id=current_user_id,
)
project = Project.objects.get(id=project_pk).select_related("leader")
project = (
Project.objects.select_related("leader")
.get(id=project_pk)
.select_related("leader")
)
if project.leader.id == current_user_id:
return Response(
{
Expand Down

0 comments on commit 181c4d5

Please sign in to comment.