check PredefinedType if exists not based on schema

This commit is contained in:
atom3
2021-04-30 08:41:33 +02:00
parent a65a34cfe7
commit 3b806a5466
+1 -1
View File
@@ -83,7 +83,7 @@ class entity(facet):
def __call__(self, inst, logger):
# @nb with inheritance
if self.predefinedtype and "4" in ifc_file.schema:
if self.predefinedtype and hasattr(inst, "PredefinedType"):
# logger.debug("Testing if entity predefinedtype '%s' == '%s'", inst.PredefinedType, self.predefinedtype)
self.message = "an entity name '%(name)s' of predefined type '%(predefinedtype)s'"
return facet_evaluation(inst.is_a(self.name) and inst.PredefinedType == self.predefinedtype, self.message % {"name": inst.is_a(), "predefinedtype": inst.PredefinedType})