|
@@ -68,6 +68,7 @@ class EquipmentManagerV3(View):
|
|
|
View_Password = self.decode_pwd(View_Password)
|
|
|
Type = request_dict.get('Type', None)
|
|
|
ChannelIndex = request_dict.get('ChannelIndex', None)
|
|
|
+ version = request_dict.get('version', None)
|
|
|
isCheckMainUser = request_dict.get('isCheckMainUser', None)
|
|
|
isMainUserExists = False
|
|
|
if all([UID, NickName, View_Account, Type, ChannelIndex]):
|
|
@@ -128,7 +129,7 @@ class EquipmentManagerV3(View):
|
|
|
'vodPrimaryUserID': vodPrimaryUserID,
|
|
|
'vodPrimaryMaster': vodPrimaryMaster,
|
|
|
'data_joined': '',
|
|
|
- 'version': '',
|
|
|
+ 'version': version,
|
|
|
'isVod': 0,
|
|
|
'isExist': 1,
|
|
|
'userID__userEmail': ''
|
|
@@ -157,6 +158,7 @@ class EquipmentManagerV3(View):
|
|
|
'ip': CommonService.get_ip_address(request_dict),
|
|
|
'channel': ChannelIndex,
|
|
|
'nickname': NickName,
|
|
|
+ 'version': version,
|
|
|
}
|
|
|
UidSetModel.objects.create(**uid_set_create_dict)
|
|
|
else:
|
|
@@ -165,6 +167,7 @@ class EquipmentManagerV3(View):
|
|
|
userDevice = Device_Info(id=pk, userID_id=userID, UID=UID,
|
|
|
NickName=NickName, View_Account=View_Account,
|
|
|
View_Password=View_Password, Type=Type, ChannelIndex=ChannelIndex,
|
|
|
+ version=version,
|
|
|
vodPrimaryUserID=vodPrimaryUserID, vodPrimaryMaster=vodPrimaryMaster)
|
|
|
userDevice.save()
|
|
|
Device_Info.objects.filter(UID=UID).update(vodPrimaryUserID=vodPrimaryUserID,
|
|
@@ -205,7 +208,7 @@ class EquipmentManagerV3(View):
|
|
|
else:
|
|
|
return response.json(tko.code)
|
|
|
else:
|
|
|
- return response.json(444, {'param': 'UID,NickName,View_Account,View_Password,Type,ChannelIndex'})
|
|
|
+ return response.json(444, {'param': 'UID,NickName,View_Account,View_Password,Type,ChannelIndex,version'})
|
|
|
|
|
|
def do_modify(self, userID, request_dict, response, request):
|
|
|
token = request_dict.get('token', None)
|
|
@@ -225,7 +228,6 @@ class EquipmentManagerV3(View):
|
|
|
try:
|
|
|
# deviceData = json.loads(deviceContent)
|
|
|
deviceData = eval(deviceContent)
|
|
|
-
|
|
|
if deviceData.__contains__('userID_id'):
|
|
|
asy = threading.Thread(target=ModelService.update_log,
|
|
|
args=(CommonService.get_ip_address(request), userID, 'modifyV3', deviceData, id))
|