mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +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.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:
|
||||
prop.Unit = unit
|
||||
del self.settings["properties"][prop.Name]
|
||||
|
||||
Reference in New Issue
Block a user