Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES/2122.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix an `AttributeError` issue that most commonly appears when running the `container-handle-image-data` management command.
11 changes: 5 additions & 6 deletions pulp_container/app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,11 @@ def init_architecture_and_os(self):
if self.json_manifest.get("architecture", None) or self.json_manifest.get("os", None):
self.architecture = self.json_manifest.get("architecture", None)
self.os = self.json_manifest.get("os", None)
return

config_artifact = self.config_blob._artifacts.get()
config_data, _ = get_content_data(config_artifact)
self.architecture = config_data.get("architecture", None)
self.os = config_data.get("os", None)
elif self.config_blob:
config_artifact = self.config_blob._artifacts.get()
config_data, _ = get_content_data(config_artifact)
self.architecture = config_data.get("architecture", None)
self.os = config_data.get("os", None)

def init_compressed_image_size(self):
# manifestv2 schema1 has only blobSum definition for each layer
Expand Down