|
@@ -403,7 +403,8 @@ class oa2DiscoveryDevice(TemplateView):
|
|
|
return JsonResponse({'res': '用户数据不存在!'})
|
|
|
|
|
|
response = ResObject()
|
|
|
- userID = user_qs.userID
|
|
|
+ user = user_qs[0]
|
|
|
+ userID = user.userID
|
|
|
|
|
|
#更新事件网关接口
|
|
|
alexAuth = AlexaAuthModel.objects.filter(token=access_token).order_by('-addTime')
|
|
@@ -451,7 +452,7 @@ class oa2DiscoveryDevice(TemplateView):
|
|
|
uid_arr = res_json['result']['uid_arr']
|
|
|
rtko = tkObject(rank=1)
|
|
|
now_time = int(time.time())
|
|
|
- user_qs.uid_rtsp.clear()
|
|
|
+ user.uid_rtsp.clear()
|
|
|
res_json = []
|
|
|
uid_rtsp_id_list = []
|
|
|
for uid_a in uid_arr:
|
|
@@ -494,7 +495,7 @@ class oa2DiscoveryDevice(TemplateView):
|
|
|
'uri': rtsp_uri
|
|
|
}
|
|
|
res_json.append(ur_data)
|
|
|
- user_qs.uid_rtsp.add(*uid_rtsp_id_list)
|
|
|
+ user.uid_rtsp.add(*uid_rtsp_id_list)
|
|
|
logger.info('________________471')
|
|
|
logger.info(res_json)
|
|
|
return JsonResponse(res_json, safe=False)
|