Explorar el Código

修改机器人列表查询

zhouyuexiang hace 2 meses
padre
commit
5f3467b207
Se han modificado 1 ficheros con 1 adiciones y 3 borrados
  1. 1 3
      api/services/app_service.py

+ 1 - 3
api/services/app_service.py

@@ -66,7 +66,6 @@ class AppService:
         main_query = db.select(App).where(*filters)
         # 添加 auth_type 参数
         auth_type = args.get("auth_type")
-        print('auth_type', auth_type)
         # 根据 auth_type 构建不同的查询
         if auth_type is None:
             query1 = db.select(App.id).where(
@@ -121,9 +120,8 @@ class AppService:
 
         print(str(main_query))
 
-        # 执行分页查询
         app_models = db.paginate(
-            db.select(App).where(*filters).order_by(App.created_at.desc()),
+            main_query.order_by(App.created_at.desc()),
             page=args["page"],
             per_page=args["limit"],
             error_out=False,