Browse Source

统一字段key

guanhailong 2 years ago
parent
commit
db5555e977
1 changed files with 4 additions and 1 deletions
  1. 4 1
      AdminController/DeviceManagementController.py

+ 4 - 1
AdminController/DeviceManagementController.py

@@ -508,7 +508,10 @@ class DeviceManagement(View):
                 app_bundle_qs = app_bundle_qs.filter(type=type)
             total = app_bundle_qs.count()
             app_bundle_qs = app_bundle_qs[(page - 1) * line:page * line]
-            app_device_type_list = [app_bundle for app_bundle in app_bundle_qs]
+            app_device_type_list = []
+            for app_bundle in app_bundle_qs:
+                app_bundle['version_number'] = app_bundle.pop('app_device_type__app_version_number_id')
+                app_device_type_list.append(app_bundle)
             return response.json(0, {'list': app_device_type_list, 'total': total})
         except Exception as e:
             print(e)