فهرست منبع

添加设备音频修改算法类型id

linhaohong 5 ماه پیش
والد
کامیت
c5c4a1729a
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      AdminController/DeviceManagementController.py

+ 3 - 1
AdminController/DeviceManagementController.py

@@ -1748,8 +1748,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: