locky 4 anni fa
parent
commit
19d184fd86
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      Controller/OTAEquipment.py

+ 1 - 1
Controller/OTAEquipment.py

@@ -736,7 +736,7 @@ def checkMaxVersion(request):
     lang = request_dict.get('lang', None)   # 'zh-Hans','en'
     if not deviceType or not version:
         return response.json(444, 'deviceType or version')
-    now_version = version[:version.rindex('.')]
+    now_version = version[1:version.rindex('.')] # 去掉V
     code = version[version.rindex('.')+1:]
     equipmentVersion = Equipment_Version.objects.filter(mci=deviceType, code=code, lang=lang, status=1) # order by data_joined
     # 判断是否有该版本存在