mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 02:07:36 +00:00
entity_instance constructor - skip setting None value
This commit is contained in:
@@ -156,6 +156,7 @@ class entity_instance:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
wrapped_data: ifcopenshell_wrapper.entity_instance
|
wrapped_data: ifcopenshell_wrapper.entity_instance
|
||||||
|
method_list: Union[MethodList, None] = None
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@@ -171,7 +172,6 @@ class entity_instance:
|
|||||||
if isinstance(e, tuple):
|
if isinstance(e, tuple):
|
||||||
e = ifcopenshell_wrapper.new_IfcBaseClass(*e)
|
e = ifcopenshell_wrapper.new_IfcBaseClass(*e)
|
||||||
object.__setattr__(self, "wrapped_data", e)
|
object.__setattr__(self, "wrapped_data", e)
|
||||||
object.__setattr__(self, "method_list", None)
|
|
||||||
|
|
||||||
# Make sure the file is not gc'ed while we have live instances
|
# Make sure the file is not gc'ed while we have live instances
|
||||||
e.file = file
|
e.file = file
|
||||||
|
|||||||
Reference in New Issue
Block a user