Skip to content

Commit

Permalink
Fix webapp nonetype errors (Azure#16605)
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinsID authored Jan 21, 2021
1 parent bc02176 commit f58842b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/azure-cli/azure/cli/command_modules/appservice/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi
site_config.linux_fx_version = _format_fx_version(encoded_config_file, multicontainer_config_type)

elif plan_info.is_xenon: # windows container webapp
site_config.windows_fx_version = _format_fx_version(deployment_container_image_name)
if deployment_container_image_name:
site_config.windows_fx_version = _format_fx_version(deployment_container_image_name)
# set the needed app settings for container image validation
if name_validation.name_available:
site_config.app_settings.append(NameValuePair(name="DOCKER_REGISTRY_SERVER_USERNAME",
Expand Down Expand Up @@ -3718,7 +3719,7 @@ def webapp_up(cmd, name=None, resource_group_name=None, plan=None, location=None
"Please check if you have configured defaults for plan name and re-run command."
.format(plan, current_plan))
plan = plan or plan_details['name']
plan_info = client.app_service_plans.get(rg_name, plan)
plan_info = client.app_service_plans.get(plan_details['resource_group'], plan)
sku = plan_info.sku.name if isinstance(plan_info, AppServicePlan) else 'Free'
current_os = 'Linux' if plan_info.reserved else 'Windows'
# Raise error if current OS of the app is different from the current one
Expand Down

0 comments on commit f58842b

Please sign in to comment.