mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
util.schema.reassign_class to return early if class already assigned
This commit is contained in:
@@ -166,6 +166,9 @@ def reassign_class(
|
||||
:raises ValueError: If ``new_class`` does not exist in the provided file schema.
|
||||
"""
|
||||
|
||||
if element.is_a() == new_class:
|
||||
return element
|
||||
|
||||
if not ifc_file:
|
||||
ifc_file = element.file
|
||||
|
||||
|
||||
Reference in New Issue
Block a user