Skip to content

Commit

Permalink
fix: move key access inside falsy check
Browse files Browse the repository at this point in the history
Otherwise, this fails when trying to create a new image.

Signed-off-by: Ralph Bean <[email protected]>
  • Loading branch information
ralphbean committed Nov 8, 2024
1 parent a5f9d9f commit b2483ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyxis/create_container_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,9 @@ def main(): # pragma: no cover

# First check if it exists at all
image = image_already_exists(args, args.architecture_digest, repository=None)
identifier = image["_id"]
if image:
# Then, check if it exists in association with the given repository
identifier = image["_id"]
if image_already_exists(args, args.architecture_digest, repository=args.name):
LOGGER.info(
f"Image with given docker_image_digest already exists as {identifier} "
Expand Down

0 comments on commit b2483ab

Please sign in to comment.