Skip to content

Commit 435b3c4

Browse files
committed
Follow same default behavior whether we query for image or get it ourselves
1 parent 11932b1 commit 435b3c4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/azure-cli/azure/cli/command_modules/containerapp

src/azure-cli/azure/cli/command_modules/containerapp/custom.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,7 +1575,7 @@ def start_containerappsjob(cmd,
15751575
if image is not None:
15761576
container_def["image"] = image if not is_registry_msi_system(registry_identity) else HELLO_WORLD_IMAGE
15771577
else:
1578-
# Fetch the existing job definition to get the default image
1578+
Fetch the existing job definition to get the default image
15791579
try:
15801580
containerappjob_def = ContainerAppsJobClient.show(cmd=cmd, resource_group_name=resource_group_name, name=name)
15811581
except Exception as e:
@@ -1587,7 +1587,7 @@ def start_containerappsjob(cmd,
15871587
existing_image = safe_get(containerappjob_def, "properties", "template", "containers", default=[{}])[0].get("image")
15881588
if not existing_image:
15891589
raise ValidationError("Could not find an existing image for the containerapp job '{}'. Please specify --image.".format(name))
1590-
container_def["image"] = existing_image
1590+
container_def["image"] = existing_image if not is_registry_msi_system(registry_identity) else HELLO_WORLD_IMAGE
15911591

15921592
if env_vars is not None:
15931593
container_def["env"] = parse_env_var_flags(env_vars)

0 commit comments

Comments
 (0)