diff --git a/api/chalicelib/core/projects.py b/api/chalicelib/core/projects.py index 865a4a73c..0ec2ab97c 100644 --- a/api/chalicelib/core/projects.py +++ b/api/chalicelib/core/projects.py @@ -83,7 +83,7 @@ def get_projects(tenant_id, recording_state=False, gdpr=None, recorded=False, st FROM public.projects AS s {extra_join} WHERE s.deleted_at IS NULL - ORDER BY s.project_id {") AS raw" if recorded else ""};""", {"now": TimeUTC.now()}) + ORDER BY s.name {") AS raw" if recorded else ""};""", {"now": TimeUTC.now()}) cur.execute(query) rows = cur.fetchall() # if recorded is requested, check if it was saved or computed diff --git a/ee/api/chalicelib/core/projects.py b/ee/api/chalicelib/core/projects.py index 467f4185e..4d77f7ba5 100644 --- a/ee/api/chalicelib/core/projects.py +++ b/ee/api/chalicelib/core/projects.py @@ -95,7 +95,7 @@ def get_projects(tenant_id, recording_state=False, gdpr=None, recorded=False, st {role_query if user_id is not None else ""} WHERE s.tenant_id =%(tenant_id)s AND s.deleted_at IS NULL - ORDER BY s.project_id {") AS raw" if recorded else ""};""", + ORDER BY s.name {") AS raw" if recorded else ""};""", {"tenant_id": tenant_id, "user_id": user_id, "now": TimeUTC.now()}) cur.execute(query) rows = cur.fetchall()