From 0b2de81a34c95e46cc8c8ec7f11af02574ec35fa Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 1 Aug 2024 17:11:53 +0200 Subject: [PATCH] Ensure BaseModel.all() returns sorted results. --- plomtask/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plomtask/db.py b/plomtask/db.py index 67a7fc7..dc61f1a 100644 --- a/plomtask/db.py +++ b/plomtask/db.py @@ -477,7 +477,7 @@ class BaseModel(Generic[BaseModelId]): item = cls.by_id(db_conn, id_) assert item.id_ is not None items[item.id_] = item - return list(items.values()) + return sorted(list(items.values())) @classmethod def by_date_range_with_limits(cls: type[BaseModelInstance], -- 2.30.2