From 8b5dd8320dbe2941a594ecab4a2bf5b3aceab6fe Mon Sep 17 00:00:00 2001 From: Licini Date: Wed, 24 Jul 2024 09:48:01 +0200 Subject: [PATCH] use wrappedValue in to_dict --- src/compas_ifc/entities/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compas_ifc/entities/base.py b/src/compas_ifc/entities/base.py index 63da508..cd457de 100644 --- a/src/compas_ifc/entities/base.py +++ b/src/compas_ifc/entities/base.py @@ -142,6 +142,8 @@ def to_dict(self, recursive=False, ignore_fields=[], include_fields=[]): continue value = getattr(self, key) + if hasattr(value, "wrappedValue"): + value = value.wrappedValue if recursive and isinstance(value, Base): value = value.to_dict(recursive=recursive)