From 7ee385866a00ed811d3d7030d50db37199502b0f Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Fri, 3 Apr 2020 16:08:49 +1100 Subject: [PATCH] Minor fix --- src/ifcblenderexport/blenderbim/export_ifc.py | 2 +- src/ifccobie/cobie.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ifcblenderexport/blenderbim/export_ifc.py b/src/ifcblenderexport/blenderbim/export_ifc.py index 0565ef5671..bfaa3ee618 100644 --- a/src/ifcblenderexport/blenderbim/export_ifc.py +++ b/src/ifcblenderexport/blenderbim/export_ifc.py @@ -556,7 +556,7 @@ class IfcParser(): added_objs.append(spatial_obj) parent_collection = self.get_parent_collection(parent_collection) results.extend(added_objs) - return results + return set(results) def categorise_selected_objects(self, objects_to_sort, metadata=None): if not metadata: diff --git a/src/ifccobie/cobie.py b/src/ifccobie/cobie.py index fc0feba527..5dc7ec756c 100644 --- a/src/ifccobie/cobie.py +++ b/src/ifccobie/cobie.py @@ -905,7 +905,10 @@ class IfcCobieParser(): both = history.OwningUser person = both.ThePerson organisation = both.TheOrganization - for role in ((both.Roles or []) + (person.Roles or []) + (organisation.Roles or [])): + both_roles = list(both.Roles) if both.Roles else [] + person_roles = list(person.Roles) if person.Roles else [] + organisation_roles = list(organisation.Roles) if organisation.Roles else [] + for role in (both_roles + person_roles + organisation_roles): roles.append(self.get_role(role)) result = ','.join(set(roles)) if not result: