Skip to content

Commit

Permalink
Filter duplicate print layouts (layout in project takes precedence)
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Dec 19, 2023
1 parent 3687455 commit 477f048
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/config_generator/theme_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ def read_metadata_for_theme(self, item):
self.logger.warning(
"Could not get WMS capabilities for %s" % url
)
wms_capabilities["print_templates"] = wms_capabilities.get('print_templates', []) + self.print_layouts
project_layouts = wms_capabilities.get('print_templates', [])
project_layouts_names = [layout['name'] for layout in project_layouts]
wms_capabilities["print_templates"] = project_layouts + \
[layout for layout in self.print_layouts if layout["name"] not in project_layouts_names]

wfs_capabilities = {}
if self.generate_wfs_services:
Expand Down

0 comments on commit 477f048

Please sign in to comment.