forked from github/plane
fix: project sort order
This commit is contained in:
parent
54c2a23a7e
commit
9ad0c8403f
@ -161,7 +161,7 @@ class ProjectMember(ProjectBaseModel):
|
|||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
if self._state.adding:
|
if self._state.adding:
|
||||||
smallest_sort_order = ProjectMember.objects.filter(
|
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"]
|
).aggregate(smallest=models.Min("sort_order"))["smallest"]
|
||||||
|
|
||||||
# Project ordering
|
# Project ordering
|
||||||
|
Loading…
Reference in New Issue
Block a user