Skip to content

Commit 3208f5f

Browse files
authored
Do not overwrite provenance information written by ProvenanceLogger (#2987)
1 parent 4dcd877 commit 3208f5f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

esmvalcore/_task.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,8 @@ def _collect_provenance(self) -> None:
726726
valid = True
727727
for filename, orig_attributes in table.items():
728728
# copy to avoid updating other entries if file contains anchors
729-
attributes = deepcopy(orig_attributes)
729+
attributes = deepcopy(attrs)
730+
attributes.update(deepcopy(orig_attributes))
730731
ancestor_files = attributes.pop("ancestors", [])
731732
if not ancestor_files:
732733
logger.warning(
@@ -764,8 +765,6 @@ def _collect_provenance(self) -> None:
764765
self.name,
765766
)
766767

767-
attributes.update(deepcopy(attrs))
768-
769768
TAGS.replace_tags_in_dict(attributes)
770769

771770
product = TrackedFile(Path(filename), attributes, ancestors)

0 commit comments

Comments
 (0)