Skip to content

Commit

Permalink
Fix a sync error with manifests without mediaType
Browse files Browse the repository at this point in the history
fixes: #1746
  • Loading branch information
git-hyagi committed Aug 26, 2024
1 parent d5d149e commit fb3b019
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGES/1746.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Resolved an issue with syncing content causing errors when retrieving manifests without a mediaType
definition.
6 changes: 2 additions & 4 deletions pulp_container/app/tasks/sync_stages.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,11 +426,9 @@ async def _download_and_instantiate_manifest(self, manifest_url, digest):
manifest = Manifest(
digest=digest,
schema_version=(
2
if content_data["mediaType"] in (MEDIA_TYPE.MANIFEST_V2, MEDIA_TYPE.MANIFEST_OCI)
else 1
2 if media_type in (MEDIA_TYPE.MANIFEST_V2, MEDIA_TYPE.MANIFEST_OCI) else 1
),
media_type=content_data["mediaType"],
media_type=media_type,
data=raw_text_data,
annotations=content_data.get("annotations", {}),
)
Expand Down

0 comments on commit fb3b019

Please sign in to comment.