Browse Source

修改批量添加设备异常

zhangdongming 2 năm trước cách đây
mục cha
commit
d521efcb23
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      Controller/EquipmentManagerV3.py

+ 2 - 1
Controller/EquipmentManagerV3.py

@@ -426,7 +426,7 @@ class EquipmentManagerV3(View):
                         'nickname': NickName,
                         'version': version,
                         'region_alexa': region_alexa,
-                        'device_type': is_bind[0]['Type'],
+                        'device_type': is_bind[0]['Type'] if is_bind.exists() else int(Type),
                         'tb_country': country
                     }
                     UidSet = UidSetModel.objects.create(**uid_set_create_dict)
@@ -504,6 +504,7 @@ class EquipmentManagerV3(View):
                 success_res['deviceNumber'] = deviceNumber
                 add_success_flag = True
         except Exception as e:
+            LOGGER.info('异常详情,errLine:{}, errMsg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
             print(e)
             error_res = repr(e)
             exception_flag = True