Skip to content

Commit bdfb177

Browse files
fix(dumper) use the dump creation date:
1 parent ca6f8ae commit bdfb177

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

cds_migrator_kit/transform/dumper.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ def first_created(self):
4242
"""Get first record creation date."""
4343
# modification datetime of first revision is the creation date of the whole record
4444
# this assumption is based on the hstRECORD dump from invenio-migrator module
45-
return self.data["record"][0]["modification_datetime"]
45+
# for older records first revision is not the creation of record
46+
# so we added creation_date field to dump and it's getting it from bibrec
47+
# https://github.com/inveniosoftware/invenio-migrator/blob/master/invenio_migrator/legacy/records.py#L216
48+
return self.data["creation_date"]
4649

4750
def prepare_revisions(self):
4851
"""Prepare revisions."""

0 commit comments

Comments
 (0)