|
@@ -514,7 +514,7 @@ def getNewVerInterface(request):
|
|
|
equipmentValid = Equipment_Version.objects.filter(code=code, status=1, lang=lang).order_by(
|
|
|
'-data_joined')
|
|
|
else:
|
|
|
- equipmentValid = Equipment_Version.objects.filter(code=code, status=1,lang='').order_by('-data_joined')
|
|
|
+ equipmentValid = Equipment_Version.objects.filter(code=code, status=1,lang=0).order_by('-data_joined')
|
|
|
except Exception as e:
|
|
|
return response.json(500, {'details': repr(e)})
|
|
|
else:
|
|
@@ -587,8 +587,8 @@ class uploadOTAInterfaceView(TemplateView):
|
|
|
def upload_ota_file(self, fileName, response,fileType,language):
|
|
|
try:
|
|
|
if not language:
|
|
|
- language = 'xx'
|
|
|
- path = '/'.join((BASE_DIR, 'static/otapack', fileType,language)).replace('\\', '/') + '/'
|
|
|
+ language = 0
|
|
|
+ path = '/'.join((BASE_DIR, 'static/otapack', fileType,str(language))).replace('\\', '/') + '/'
|
|
|
if not os.path.exists(path):
|
|
|
os.makedirs(path)
|
|
|
file_name = path + str(fileName)
|