geopython / pycsw

pycsw is an OGC CSW server implementation written in Python. pycsw fully implements the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web]. Initial development started in 2010 (more formally announced in 2011). The project is certified OGC Compliant, and is an OGC Reference Implementation. pycsw allows for the publishing and discovery of geospatial metadata via numerous APIs (CSW 2/CSW 3, OpenSearch, OAI-PMH, SRU). Existing repositories of geospatial metadata can also be exposed, providing a standards-based metadata and catalogue component of spatial data infrastructures. pycsw is Open Source, released under an MIT license, and runs on all major platforms (Windows, Linux, Mac OS X). Please read the docs at https://pycsw.org/docs for more information.
https://pycsw.org
MIT License
206 stars 155 forks source link

do not fail if fedcats is empty in config #950

Closed pvgenuchten closed 7 months ago

pvgenuchten commented 8 months ago

Overview

in python, if foo['bar'] is None:

foo.get('bar',[]) == None

therefore add a None check, before calling it, probable there is a more efficient way to do it...

Related Issue / Discussion

947

Contributions and Licensing

(as per https://github.com/geopython/pycsw/blob/master/CONTRIBUTING.rst#contributions-and-licensing)

pvgenuchten commented 7 months ago

updated as suggested @tomkralidis