From 63fca1ff588b0351c375dcab558adea40a92dbc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Cl=C3=A9rice?= Date: Wed, 24 Jan 2024 18:01:58 +0100 Subject: [PATCH] Fixed warning for sort_logic under SQL Alchemy 3 --- app/models/control_lists.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/control_lists.py b/app/models/control_lists.py index dbb54d1f..80b3d06a 100644 --- a/app/models/control_lists.py +++ b/app/models/control_lists.py @@ -51,7 +51,7 @@ class ControlLists(db.Model): users = association_proxy('control_lists_user', 'user') - sort_logic = case(_PublicationStatusOrder, value=public).label("priority") + _sort_logic = case(_PublicationStatusOrder, value=public).label("priority") @property def str_public(self): @@ -132,7 +132,7 @@ def get_available(user): ControlLists.public == PublicationStatus.public, ControlListsUser.user_id == user.id ) - ).order_by(ControlLists.sort_logic, ControlLists.name).all() + ).order_by(ControlLists._sort_logic, ControlLists.name).all() def get_allowed_values(self, allowed_type="lemma", order_by="label", kw=None): """ List values that are allowed (without label) or checks that given label is part