Skip to content

Commit

Permalink
Ensure that for import we insert records in the correct order
Browse files Browse the repository at this point in the history
This ensures we do not try to load exposure before we've loaded
day_obs.
  • Loading branch information
timj committed Feb 2, 2024
1 parent 1bddfd2 commit 0449ec0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/lsst/daf/butler/transfers/_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,9 @@ def load(
skip_dimensions: set | None = None,
) -> None:
# Docstring inherited from RepoImportBackend.load.
for element, dimensionRecords in self.dimensions.items():
# Must ensure we insert in order supported by the universe.
for element in self.registry.dimensions.sorted(self.dimensions.keys()):
dimensionRecords = self.dimensions[element]
if skip_dimensions and element in skip_dimensions:
continue
# Using skip_existing=True here assumes that the records in the
Expand Down

0 comments on commit 0449ec0

Please sign in to comment.