Преглед на файлове

添加设备允许昵称为空字符

peng преди 2 години
родител
ревизия
4f0d910f24
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      Controller/EquipmentManagerV3.py

+ 3 - 0
Controller/EquipmentManagerV3.py

@@ -90,6 +90,9 @@ class EquipmentManagerV3(View):
         family_id = request_dict.get('familyId', None)
         room_id = request_dict.get('roomId', None)
 
+        if not NickName:
+            NickName = UID[:6]
+
         if not all([UID, NickName, View_Account, Type, ChannelIndex]):  # Type和ChannelIndex可能为0
             return response.json(444, {'param': 'UID, NickName, View_Account, Type, ChannelIndex'})