Browse Source

非自然排序

rambo 1 week ago
parent
commit
45d4c1aeed
2 changed files with 2 additions and 2 deletions
  1. 1 1
      python/api.py
  2. 1 1
      python/sockets/message_handler.py

+ 1 - 1
python/api.py

@@ -964,7 +964,7 @@ def get_device_configs(params: ModelGetDeviceConfig):
         session,
         conditions={"tab_id": tab_id},
         order_by="action_index",
-        ascending=True,
+        ascending=False,
     )
     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=True
+                session, conditions=condtions, order_by="action_index", ascending=False
             )
             if len(all_devices) == 0:
                 # 判断是否有可用配置