mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-06 12:26:26 +00:00
pset.edit_pset not to fail silently on invalid enum values #4608
This commit is contained in:
@@ -260,6 +260,11 @@ class Usecase:
|
|||||||
prop.EnumerationReference.EnumerationValues = value.EnumerationReference.EnumerationValues
|
prop.EnumerationReference.EnumerationValues = value.EnumerationReference.EnumerationValues
|
||||||
prop.EnumerationValues = value.EnumerationValues
|
prop.EnumerationValues = value.EnumerationValues
|
||||||
|
|
||||||
|
else:
|
||||||
|
raise ValueError(
|
||||||
|
f'Value "{self.settings["properties"][prop.Name]}" is not a valid value for enum property {prop.Name}.'
|
||||||
|
)
|
||||||
|
|
||||||
if unit:
|
if unit:
|
||||||
prop.Unit = unit
|
prop.Unit = unit
|
||||||
del self.settings["properties"][prop.Name]
|
del self.settings["properties"][prop.Name]
|
||||||
|
|||||||
Reference in New Issue
Block a user