Skip to content

Commit

Permalink
use pythonic syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
pvgenuchten committed Feb 15, 2024
1 parent 3267782 commit 2421bc8
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions pycsw/ogc/api/records.py
Original file line number Diff line number Diff line change
Expand Up @@ -1021,13 +1021,12 @@ def get_collection_info(self, collection_name: str = 'metadata:main',
if 'federatedcatalogues' in self.config:
LOGGER.debug('Adding federated catalogues')
collection_info['federatedCatalogues'] = []
if not self.config['federatedcatalogues']: # if empty in config
self.config['federatedcatalogues'] = []
for fc in self.config.get('federatedcatalogues', []):
collection_info['federatedCatalogues'].append({
'type': 'OGC API - Records',
'url': fc
})
if self.config.get('federatedcatalogues') not in [None,""]: # if empty in config
for fc in self.config.get('federatedcatalogues'):
collection_info['federatedCatalogues'].append({
'type': 'OGC API - Records',
'url': fc
})

return collection_info

Expand Down

0 comments on commit 2421bc8

Please sign in to comment.