From 1e31e834d257e2fcf86c2b2d6ff7ecb9bc3030fb Mon Sep 17 00:00:00 2001 From: Haroon Feisal Date: Wed, 4 May 2022 12:35:45 -0400 Subject: [PATCH] Fixed bug. --- src/containerapp/azext_containerapp/_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/containerapp/azext_containerapp/_utils.py b/src/containerapp/azext_containerapp/_utils.py index ffbb8499047..846e899d371 100644 --- a/src/containerapp/azext_containerapp/_utils.py +++ b/src/containerapp/azext_containerapp/_utils.py @@ -820,8 +820,9 @@ def _update_traffic_weights(containerapp_def, list_weights): if not is_existing: containerapp_def["properties"]["configuration"]["ingress"]["traffic"].append({ - "revisionName": key_val[0], - "weight": int(key_val[1]) + "revisionName": key_val[0] if key_val[0].lower() != "latest" else None, + "weight": int(key_val[1]), + "latestRevision": key_val[0].lower() == "latest" })