Skip to content

Commit

Permalink
Fixed warning for sort_logic under SQL Alchemy 3
Browse files Browse the repository at this point in the history
  • Loading branch information
PonteIneptique committed Jan 24, 2024
1 parent 7431b4e commit 63fca1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/control_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 63fca1f

Please sign in to comment.