Explorar o código

优化子设备修改

zhangdongming %!s(int64=3) %!d(string=hai) anos
pai
achega
6c579670f5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Controller/SensorGateway/SubDeviceController.py

+ 1 - 1
Controller/SensorGateway/SubDeviceController.py

@@ -149,7 +149,7 @@ class GatewaySubDeviceView(View):
                 return response.json(173)
             if nickName:
                 gateway_sub_qs.update(nickname=nickName)
-            elif room_id:
+            if room_id:
                 FamilyRoomDevice.objects.filter(sub_device=gateway_sub_id).update(room_id=room_id)
             return response.json(0)
         except Exception as e: