From a20daffc4bacbfbdb1dc34023222a21694ee6c49 Mon Sep 17 00:00:00 2001 From: KatKatKateryna <89912278+KatKatKateryna@users.noreply.github.com> Date: Thu, 5 Sep 2024 14:31:22 +0100 Subject: [PATCH] Extra check (#10) * colors and materials * traverse for colors * fix multipolygons in 3d * prioritize attributes by default, less geometry divisions * fix multipolygons * split polygons in leaflet * ensure speckleURL argument * avoid multiple loops * URL exceptions handling * add bbox per feature * leaflet controls to the right * html syntax * 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)