fix: project sort order

This commit is contained in:
pablohashescobar 2023-07-31 18:54:39 +05:30
parent 54c2a23a7e
commit 9ad0c8403f

View File

@ -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