Эх сурвалжийг харах

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

linhaohong 5 сар өмнө
parent
commit
6a939a633d

+ 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: