Skip to content
Snippets Groups Projects
Commit 2e01e4f8 authored by juanf's avatar juanf
Browse files

SSDM-13676: missing key error bugfix

parent 53118c64
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
...@@ -132,9 +132,12 @@ def _removeInventorySpace(context, settingsSamples, code): ...@@ -132,9 +132,12 @@ def _removeInventorySpace(context, settingsSamples, code):
for settingsSample in settingsSamples: for settingsSample in settingsSamples:
settings = settingsSample.getProperty("$ELN_SETTINGS") settings = settingsSample.getProperty("$ELN_SETTINGS")
if settings is not None: if settings is not None:
removed = False
settings = json.loads(settings) settings = json.loads(settings)
removed = _removeFromList(settings["inventorySpaces"], code) if "inventorySpaces" in settings:
removed = removed or _removeFromList(settings["inventorySpacesReadOnly"], code) removed = _removeFromList(settings["inventorySpaces"], code)
if "inventorySpacesReadOnly" in settings:
removed = removed or _removeFromList(settings["inventorySpacesReadOnly"], code)
if removed: if removed:
settingsUpdated = True settingsUpdated = True
_updateSettings(context, settingsSample, settings) _updateSettings(context, settingsSample, settings)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment