Skip to content
Snippets Groups Projects
Verified Commit 85b675fd authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

metadata: Drop unsupported key 'type'

Fix issue [1] which prevents indexer journal client from consuming the journal.

[1] https://sentry.softwareheritage.org/share/issue/1d3de3b47c234408889bff5c4f4b0d20/

Related to T4459#90001
parent fa0b1de2
No related branches found
No related tags found
1 merge request!375metadata: Drop unsupported key 'type'
......@@ -75,6 +75,8 @@ class ExtrinsicMetadataIndexer(
try:
results = []
for item in objects.get("raw_extrinsic_metadata", []):
# Drop attribute 'type' (from older model versions) no longer allowed.
item.pop("type", None)
remd = RawExtrinsicMetadata.from_dict(item)
sentry_sdk.set_tag("swh-indexer-remd-swhid", remd.swhid())
results.extend(self.index(remd.id, data=remd))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment