diff --git a/swh/loader/package/deposit/loader.py b/swh/loader/package/deposit/loader.py --- a/swh/loader/package/deposit/loader.py +++ b/swh/loader/package/deposit/loader.py @@ -86,7 +86,6 @@ RawExtrinsicMetadataCore( format="sword-v2-atom-codemeta-v2-in-json", metadata=raw_metadata_from_origin, - discovery_date=None, ), ], ) @@ -185,7 +184,6 @@ RawExtrinsicMetadataCore( format="sword-v2-atom-codemeta-v2-in-json", metadata=json.dumps(origin_metadata["metadata"]).encode(), - discovery_date=None, ) ] diff --git a/swh/loader/package/loader.py b/swh/loader/package/loader.py --- a/swh/loader/package/loader.py +++ b/swh/loader/package/loader.py @@ -64,7 +64,7 @@ format = attr.ib(type=str) metadata = attr.ib(type=bytes) - discovery_date = attr.ib(type=Optional[datetime.datetime]) + discovery_date = attr.ib(type=Optional[datetime.datetime], default=None) """Defaults to the visit date.""" diff --git a/swh/loader/package/nixguix/loader.py b/swh/loader/package/nixguix/loader.py --- a/swh/loader/package/nixguix/loader.py +++ b/swh/loader/package/nixguix/loader.py @@ -89,9 +89,7 @@ def get_extrinsic_snapshot_metadata(self): return [ RawExtrinsicMetadataCore( - format="nixguix-sources-json", - metadata=self.raw_sources, - discovery_date=None, + format="nixguix-sources-json", metadata=self.raw_sources, ), ] diff --git a/swh/loader/package/npm/loader.py b/swh/loader/package/npm/loader.py --- a/swh/loader/package/npm/loader.py +++ b/swh/loader/package/npm/loader.py @@ -122,9 +122,7 @@ def get_extrinsic_snapshot_metadata(self): return [ RawExtrinsicMetadataCore( - format="replicate-npm-package-json", - metadata=self._raw_info, - discovery_date=None, + format="replicate-npm-package-json", metadata=self._raw_info, ), ]