|
@@ -650,8 +650,16 @@ class MultiConfigData:
|
|
|
cur_value, status = self.get_value(cur_id_part + id)
|
|
|
# Check if the value was there in the first place
|
|
|
if status == MultiConfigData.NONE and cur_id_part != "/":
|
|
|
- # In case the element we are inspecting did not have any value set, was optional, *and* had no default, we do not want to error when trying to set it
|
|
|
- if not 'item_default' in spec_part and 'item_optional' in spec_part and spec_part['item_optional']:
|
|
|
+ # In case the element we are setting did not have any
|
|
|
+ # value set, was optional, *and* had no default, we do not
|
|
|
+ # want to error when trying to set it
|
|
|
+ # (this only goes for the 'final' element, if higher-level
|
|
|
+ # ones do not appear to exist, it is a failure, hence the
|
|
|
+ # final comparison)
|
|
|
+ if not 'item_default' in spec_part and\
|
|
|
+ 'item_optional' in spec_part and\
|
|
|
+ spec_part['item_optional'] and\
|
|
|
+ cur_id_part + id == identifier:
|
|
|
pass
|
|
|
else:
|
|
|
raise isc.cc.data.DataNotFoundError(id_part +
|