From 60c41dc76fd39d710d51fb21f63b2425f395b446 Mon Sep 17 00:00:00 2001 From: KatKatKateryna Date: Thu, 5 Sep 2024 14:29:01 +0100 Subject: [PATCH] double-check for display vals --- pygeoapi/provider/speckle_utils/display_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygeoapi/provider/speckle_utils/display_utils.py b/pygeoapi/provider/speckle_utils/display_utils.py index 8408ae8..db9da0b 100644 --- a/pygeoapi/provider/speckle_utils/display_utils.py +++ b/pygeoapi/provider/speckle_utils/display_utils.py @@ -165,11 +165,11 @@ def get_single_display_object(displayValForColor: List) -> "Base": except IndexError: break elif item is not None: - displayValForColor = item + return item mesh = Mesh.create(faces= faces, vertices=verts, colors=colors) - if len(displayValForColor)>0: + if isinstance(displayValForColor, List) and len(displayValForColor)>0: for prop in displayValForColor[0].get_member_names(): if prop not in ["colors", "vertices", "faces"]: mesh[prop] = getattr(displayValForColor[0], prop)