Просмотр исходного кода

新增插座设备归类判断

zhangdongming 2 лет назад
Родитель
Сommit
7c47b7f779
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Controller/SensorGateway/EquipmentFamilyController.py

+ 1 - 1
Controller/SensorGateway/EquipmentFamilyController.py

@@ -773,7 +773,7 @@ class EquipmentFamilyView(View):
             'created_time': now_time
         }
 
-        category = 0 if device_type == 200 or 201 else 1
+        category = 0 if device_type == 200 or device_type == 201 else 1
         data['category'] = category
         # 查询类别排序
         family_room_device_qs = FamilyRoomDevice.objects.filter(family_id=int(family_id), category=category).values(