|
@@ -90,14 +90,14 @@ class SmartSceneView(View):
|
|
|
try:
|
|
|
|
|
|
if device_id:
|
|
|
- res = cls.get_gateway_data(device_id)
|
|
|
+ res = [cls.get_gateway_data(device_id)]
|
|
|
else:
|
|
|
sub_device_qs = GatewaySubDevice.objects.filter(id=sub_device_id).values('device_id', 'device_type')
|
|
|
device_id = sub_device_qs[0]['device_id']
|
|
|
device_type = sub_device_qs[0]['device_type']
|
|
|
|
|
|
- if device_type != 216:
|
|
|
- res = cls.get_gateway_data(device_id)
|
|
|
+ if device_type != 216: # 非216返回网关
|
|
|
+ res = [cls.get_gateway_data(device_id)]
|
|
|
else:
|
|
|
gateway_data = cls.get_gateway_data(device_id)
|
|
|
sub_device_qs = GatewaySubDevice.objects.filter(
|