Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
scim: Order Users by id when queried using filter syntax.
Mateusz Mandera994ab8115e74
diff --git a/zerver/lib/scim_filter.py b/zerver/lib/scim_filter.pyindex a3dff20388b..171d5ac8f49 100644--- a/zerver/lib/scim_filter.py+++ b/zerver/lib/scim_filter.py@@ -59,4 +59,7 @@ class ZulipUserFilterQuery(UserFilterQuery):realm = RequestNotes.get_notes(request).realmassert realm is not None- return "AND zerver_realm.id = %s AND zerver_userprofile.is_bot = False", [realm.id]+ return (+ "AND zerver_realm.id = %s AND zerver_userprofile.is_bot = False ORDER BY zerver_userprofile.id",+ [realm.id],+ )diff --git a/zerver/tests/test_scim.py b/zerver/tests/test_scim.pyindex 9cc1758e1ab..e764d394380 100644--- a/zerver/tests/test_scim.py+++ b/zerver/tests/test_scim.py@@ -246,7 +246,6 @@ class TestSCIMUser(SCIMTestCase):)self.assertEqual(result.status_code, 200)output_data = orjson.loads(result.content)- output_data["Resources"].sort(key=lambda d: d["id"])user_query = UserProfile.objects.filter(realm=realm, is_bot=False, delivery_email__endswith="@zulip.com"