同步三方设备接口
This commit is contained in:
parent
0c503fc6c3
commit
14473de9de
|
@ -190,7 +190,6 @@ class TDeviceViewSet(ListModelMixin, UpdateModelMixin, DestroyModelMixin, Custom
|
||||||
else:
|
else:
|
||||||
td = TDevice(code=i['sn'], type=TDevice.DEVICE_SPEAKER)
|
td = TDevice(code=i['sn'], type=TDevice.DEVICE_SPEAKER)
|
||||||
td.name = i['name']
|
td.name = i['name']
|
||||||
td.third_info = i
|
|
||||||
td.save()
|
td.save()
|
||||||
return Response()
|
return Response()
|
||||||
|
|
||||||
|
@ -216,7 +215,6 @@ class TDeviceViewSet(ListModelMixin, UpdateModelMixin, DestroyModelMixin, Custom
|
||||||
else:
|
else:
|
||||||
td = TDevice(code=i['channelCode'], type=TDevice.DEVICE_VCHANNEL)
|
td = TDevice(code=i['channelCode'], type=TDevice.DEVICE_VCHANNEL)
|
||||||
td.name = i['channelName']
|
td.name = i['channelName']
|
||||||
td.third_info = i
|
|
||||||
td.save()
|
td.save()
|
||||||
return Response()
|
return Response()
|
||||||
|
|
||||||
|
@ -242,7 +240,6 @@ class TDeviceViewSet(ListModelMixin, UpdateModelMixin, DestroyModelMixin, Custom
|
||||||
else:
|
else:
|
||||||
td = TDevice(code=i['channelCode'], type=TDevice.DEVICE_VCHANNEL)
|
td = TDevice(code=i['channelCode'], type=TDevice.DEVICE_VCHANNEL)
|
||||||
td.name = i['channelName']
|
td.name = i['channelName']
|
||||||
td.third_info = i
|
|
||||||
td.save()
|
td.save()
|
||||||
return Response()
|
return Response()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue