Browse Source

查询编辑通过app_device_type_id

locky 3 years ago
parent
commit
5b9fdab092
1 changed files with 2 additions and 2 deletions
  1. 2 2
      AdminController/DeviceManagementController.py

+ 2 - 2
AdminController/DeviceManagementController.py

@@ -400,7 +400,7 @@ class DeviceManagement(View):
                 model=F('app_device_type__model'), type=F('app_device_type__type'), icon=F('app_device_type__icon'),
                 model=F('app_device_type__model'), type=F('app_device_type__type'), icon=F('app_device_type__icon'),
                 lang=F('app_device_type__devicenamelanguage__lang'),
                 lang=F('app_device_type__devicenamelanguage__lang'),
                 name=F('app_device_type__devicenamelanguage__name'),
                 name=F('app_device_type__devicenamelanguage__name'),
-                sort=F('app_device_type__devicenamelanguage__sort')).values('id', 'model', 'type', 'icon', 'lang',
+                sort=F('app_device_type__devicenamelanguage__sort')).values('id', 'app_device_type__id', 'model', 'type', 'icon', 'lang',
                                                                             'name', 'sort').order_by(
                                                                             'name', 'sort').order_by(
                 'app_device_type__devicenamelanguage__sort')
                 'app_device_type__devicenamelanguage__sort')
             if not app_bundle_qs.exists():
             if not app_bundle_qs.exists():
@@ -425,7 +425,7 @@ class DeviceManagement(View):
 
 
     @staticmethod
     @staticmethod
     def edit_app_device_type(request_dict, response):
     def edit_app_device_type(request_dict, response):
-        app_device_type_id = request_dict.get('id', None)
+        app_device_type_id = request_dict.get('app_device_type__id', None)
         model = request_dict.get('model', None)
         model = request_dict.get('model', None)
         type = request_dict.get('type', None)
         type = request_dict.get('type', None)
         lang = request_dict.get('lang', None)
         lang = request_dict.get('lang', None)