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"}]