Commit e042a47c authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Ignore if value isn't provided

  It is safe to ignore if value is none (it indicates the user sent a raw data).
parent 4ae7ab7e
......@@ -21,8 +21,9 @@ def isSoftwareTypeChanged(software_type):
current_software_type = context.getSourceReference()
if software_type in base_type and current_software_type in base_type:
return False
else:
return current_software_type != software_type
if software_type in [None, ""]:
return False
return current_software_type != software_type
if 'software_type' in request and isSoftwareTypeChanged(request['software_type']):
raise ValueError("Change Software Type is forbidden.")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment