Skip to content

Commit

Permalink
initialize subcatalog dictionary in generate_subcatalogs
Browse files Browse the repository at this point in the history
  • Loading branch information
fnattino committed Nov 19, 2020
1 parent 2a0c850 commit d1b561b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pystac/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,13 @@ def generate_subcatalogs(self, template, defaults=None, **kwargs):
result.extend(child.generate_subcatalogs(template, defaults=defaults))

layout_template = LayoutTemplate(template, defaults=defaults)

subcat_id_to_cat = {}
curr_parent = self
while curr_parent is not None:
subcat_id_to_cat[curr_parent.id] = curr_parent
curr_parent = curr_parent.get_parent()

items = list(self.get_items())
for item in items:
item_parts = layout_template.get_template_values(item)
Expand Down

0 comments on commit d1b561b

Please sign in to comment.