Skip to content

Commit 23f2257

Browse files
committed
small bug fix
1 parent ea3c1e5 commit 23f2257

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/compas_ifc/file.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ def export_entity(entity: Union[Base, Any], file: IFCFile):
437437

438438
new_file.save(path)
439439

440-
def create(self, cls="IfcBuildingElementProxy", parent=None, geometry=None, frame=None, properties=None, **kwargs) -> Base:
440+
def create(self, cls=None, parent=None, geometry=None, frame=None, properties=None, **kwargs) -> Base:
441441
"""
442442
Create an entity in this model.
443443
@@ -467,6 +467,9 @@ def create(self, cls="IfcBuildingElementProxy", parent=None, geometry=None, fram
467467
else:
468468
cls_name = cls
469469

470+
if cls_name is None:
471+
cls_name = "IfcBuildingElementProxy"
472+
470473
if cls_name not in self.classes:
471474
matched_classes = self.search_ifc_classes(cls_name)
472475
if not matched_classes:

0 commit comments

Comments
 (0)