From 4cf6d65e1a27ed860b957d69a41cfadcd747257e Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 16 Oct 2023 15:24:02 +0500 Subject: [PATCH] Fixed issue after 19345ff It wasn't considering that EnumerationReference could be None --- src/ifcopenshell-python/ifcopenshell/api/pset/remove_pset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset/remove_pset.py b/src/ifcopenshell-python/ifcopenshell/api/pset/remove_pset.py index 44aa512ab3..c17079dffc 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/pset/remove_pset.py +++ b/src/ifcopenshell-python/ifcopenshell/api/pset/remove_pset.py @@ -69,7 +69,7 @@ class Usecase: continue if prop.is_a("IfcPropertyEnumeratedValue"): enumeration = prop.EnumerationReference - if self.file.get_total_inverses(enumeration) == 1: + if enumeration and self.file.get_total_inverses(enumeration) == 1: self.file.remove(enumeration) self.file.remove(prop) self.file.remove(self.settings["pset"])