From 056656ef1b62a7bd9ded73c26c15bd1def4cf0ae Mon Sep 17 00:00:00 2001 From: pablohashescobar Date: Tue, 1 Aug 2023 17:46:55 +0530 Subject: [PATCH] dev: update sort order calculation --- apiserver/plane/api/views/project.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apiserver/plane/api/views/project.py b/apiserver/plane/api/views/project.py index 2f4a30d56..0489fd892 100644 --- a/apiserver/plane/api/views/project.py +++ b/apiserver/plane/api/views/project.py @@ -823,9 +823,14 @@ class ProjectJoinEndpoint(BaseAPIView): ) .aggregate(smallest=Min("sort_order")) .get("smallest", 65535) - - 10000 ) + if smallest_sort_order is None: + smallest_sort_order = 55535 + else: + smallest_sort_order = smallest_sort_order - 10000 + + workspace_role = workspace_member.role workspace = workspace_member.workspace