From e9e14228be78f4a1634c64beab37b0fc6388e2b8 Mon Sep 17 00:00:00 2001 From: lotte-amsterdam Date: Tue, 10 Nov 2026 11:51:06 +0100 Subject: [PATCH] fix for ds.schema.name objects and ds.schema.contactPoint object errors --- src/dso_api/dynamic_api/views/ogc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dso_api/dynamic_api/views/ogc.py b/src/dso_api/dynamic_api/views/ogc.py index 4f012f7da..4ff7f77fe 100644 --- a/src/dso_api/dynamic_api/views/ogc.py +++ b/src/dso_api/dynamic_api/views/ogc.py @@ -127,7 +127,7 @@ def build_record_collection(self, ds, version, base, collection_url): "conformsTo": [], "type": "Collection", "itemType": "catalog", - "title": ds.schema.title or ds.schema.name, + "title": ds.schema.title or getattr(ds.schema, "name", None), "description": ds.schema.description or "", "language": {"code": "nl", "name": "Dutch (Netherlands)"}, "rights": list(ds.schema.auth), @@ -154,7 +154,7 @@ def build_record_collection(self, ds, version, base, collection_url): if ds.schema.get("dateCreated"): metadata["created"] = ds.schema.get("dateCreated") - if ds.schema.get("contactPoint"): + if getattr(ds.schema, "contactPoint", None) is not None: metadata["contacts"] = list(ds.schema.contactPoint) else: metadata["contacts"] = [{"name": "Datapunt", "email": "datapunt@amsterdam.nl"}]