|
@@ -52,12 +52,11 @@ class cloudTestView(View):
|
|
deviceInfo_qs = Device_Info.objects.filter(userID_id=oldUserID, UID=uid, isExist=1)
|
|
deviceInfo_qs = Device_Info.objects.filter(userID_id=oldUserID, UID=uid, isExist=1)
|
|
if deviceInfo_qs[0]:
|
|
if deviceInfo_qs[0]:
|
|
# 更新设备信息
|
|
# 更新设备信息
|
|
- deviceUser_qs = Device_User.objects.filter(username=username, isExist=1).values('userID')
|
|
|
|
- userID = deviceUser_qs['userID']
|
|
|
|
- nowTime = int(time.time())
|
|
|
|
- deviceInfo_qs.update(userID=userID, update_time=nowTime)
|
|
|
|
|
|
+ deviceUser_qs = Device_User.objects.filter(username=username).values('userID')
|
|
|
|
+ userID = deviceUser_qs[0]['userID']
|
|
|
|
+ deviceInfo_qs.update(userID=userID)
|
|
except Exception as e:
|
|
except Exception as e:
|
|
- print(e)
|
|
|
|
|
|
+ # print(e)
|
|
return response.json(500, repr(e))
|
|
return response.json(500, repr(e))
|
|
else:
|
|
else:
|
|
return response.json(0)
|
|
return response.json(0)
|