Procházet zdrojové kódy

设备音频后台管理,返回算法类型优化

linhaohong před 5 měsíci
rodič
revize
6a939a633d
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 3 1
      AdminController/DeviceManagementController.py

+ 3 - 1
AdminController/DeviceManagementController.py

@@ -1745,8 +1745,10 @@ class DeviceManagement(View):
         @return:
         """
         try:
-            device_algorithm_explain_qs = DeviceAlgorithmExplain.objects.filter(lang='cn').values('title', 'algorithm_type_id')
+            device_algorithm_explain_qs = DeviceAlgorithmExplain.objects.filter(lang='cn').values('title', 'algorithm_type__type')
             device_algorithm_explain = list(device_algorithm_explain_qs)
+            for item in device_algorithm_explain:
+                item['algorithm_type_id'] = item.pop('algorithm_type__type')
             device_algorithm_explain.append({"title": "无", "algorithm_type_id": 99})
             return response.json(0, device_algorithm_explain)
         except Exception as e: