소스 검색

排序问题统一处理

rambo 1 주 전
부모
커밋
ed192ed969
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      python/api.py
  2. 1 1
      python/sockets/message_handler.py

+ 1 - 1
python/api.py

@@ -982,7 +982,7 @@ def get_device_configs(params: ModelGetDeviceConfig):
         session,
         conditions={"tab_id": tab_id},
         order_by="action_index",
-        ascending=False,
+        ascending=True,
     )
     session.close()
     return {

+ 1 - 1
python/sockets/message_handler.py

@@ -224,7 +224,7 @@ async def handlerSend(
             crud = CRUD(DeviceConfig)
             condtions = {"tab_id": tab_id}
             all_devices = crud.read_all(
-                session, conditions=condtions, order_by="action_index", ascending=False
+                session, conditions=condtions, order_by="action_index", ascending=True
             )
             if len(all_devices) == 0:
                 # 判断是否有可用配置