|
@@ -401,10 +401,11 @@ def addNewEquipmentVersionInterface(request):
|
|
deviceData = json.loads(deviceContent)
|
|
deviceData = json.loads(deviceContent)
|
|
version = deviceData.get('version', None)
|
|
version = deviceData.get('version', None)
|
|
filePath = deviceData.get('filePath', None)
|
|
filePath = deviceData.get('filePath', None)
|
|
- code = deviceContent.get('code', None)
|
|
|
|
- if code:
|
|
|
|
|
|
+ code = deviceData.get('code', None)
|
|
|
|
+ lang = deviceData.get('lang', None)
|
|
|
|
+ if code and lang:
|
|
try:
|
|
try:
|
|
- Equipment_Version.objects.filter(code=code).delete()
|
|
|
|
|
|
+ Equipment_Version.objects.filter(code=code,lang=lang).delete()
|
|
except Exception as e:
|
|
except Exception as e:
|
|
pass
|
|
pass
|
|
if version is None or filePath is None:
|
|
if version is None or filePath is None:
|