From 078098b48db769e32a697e3f7a538412314c1cde Mon Sep 17 00:00:00 2001 From: GuoQing Zhang Date: Fri, 28 Jun 2024 18:37:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=92=E8=89=B2=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8C=89=E7=85=A7=E5=88=9B=E5=BB=BA=E6=97=B6=E9=97=B4=E5=80=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/bisheng/database/models/role.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backend/bisheng/database/models/role.py b/src/backend/bisheng/database/models/role.py index 7db3bbbc5..e453bf788 100644 --- a/src/backend/bisheng/database/models/role.py +++ b/src/backend/bisheng/database/models/role.py @@ -62,6 +62,7 @@ def get_role_by_groups(cls, group: List[int], keyword: str = None, page: int = 0 statement = statement.filter(Role.role_name.like(f'%{keyword}%')) if page and limit: statement = statement.offset((page - 1) * limit).limit(limit) + statement = statement.order_by(Role.create_time.desc()) with session_getter() as session: return session.exec(statement).all()