From a695eecd9a5abe097ea76c8093997bb8d2303b0d Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sun, 26 Apr 2020 14:12:31 +1000 Subject: [PATCH] Minor fix to IFCCSV when exporting non-existant attributes --- src/ifccsv/ifccsv.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ifccsv/ifccsv.py b/src/ifccsv/ifccsv.py index f25ea8c88e..abaf89a3e8 100644 --- a/src/ifccsv/ifccsv.py +++ b/src/ifccsv/ifccsv.py @@ -143,9 +143,10 @@ class IfcSelectorParser(): class IfcAttributeExtractor(): @staticmethod def get_element_key(element, key): - if '.' not in key \ - and hasattr(element, key): + if hasattr(element, key): return getattr(element, key) + elif '.' not in key: + return None elif key[0:3] == 'Qto': qto_name, prop = key.split('.') qto = IfcAttributeExtractor.get_element_qto(element, qto_name)