Compare commits

...

4 Commits

Author SHA1 Message Date
pablohashescobar
4d7cee773e dev: project sort ordering migration 2023-07-31 19:08:05 +05:30
pablohashescobar
9ad0c8403f fix: project sort order 2023-07-31 18:54:39 +05:30
pablohashescobar
54c2a23a7e Merge branch 'develop' of github.com:makeplane/plane into fix/project_creation 2023-07-31 18:24:12 +05:30
pablohashescobar
20715a195d fix: project creation 2023-07-31 18:23:42 +05:30
2 changed files with 3 additions and 3 deletions

View File

@ -89,8 +89,8 @@ class Migration(migrations.Migration):
field=models.JSONField(default=plane.db.models.workspace.get_default_props),
),
migrations.AddField(
model_name='project',
name='sort_order',
model_name="projectmember",
name="sort_order",
field=models.FloatField(default=65535),
),
migrations.RunPython(update_project_member_sort_order),

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=self.workspace, member=self.member
workspace_id=self.project.workspace_id, member_id=self.member_id
).aggregate(smallest=models.Min("sort_order"))["smallest"]
# Project ordering