From 9ad0c8403ff92403617e99c27cfea8f51a6596de Mon Sep 17 00:00:00 2001 From: pablohashescobar Date: Mon, 31 Jul 2023 18:54:39 +0530 Subject: [PATCH] fix: project sort order --- apiserver/plane/db/models/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apiserver/plane/db/models/project.py b/apiserver/plane/db/models/project.py index d700ab5e2..bcd62908b 100644 --- a/apiserver/plane/db/models/project.py +++ b/apiserver/plane/db/models/project.py @@ -161,7 +161,7 @@ class ProjectMember(ProjectBaseModel): def save(self, *args, **kwargs): if self._state.adding: smallest_sort_order = ProjectMember.objects.filter( - workspace_id=self.workspace_id, member_id=self.member_id + workspace_id=self.project.workspace_id, member_id=self.member_id ).aggregate(smallest=models.Min("sort_order"))["smallest"] # Project ordering