From df8e626d2fbb7067bbd1dac7db6665b4a9d514b4 Mon Sep 17 00:00:00 2001 From: Abhishek Patwardhan Date: Wed, 18 Oct 2023 13:37:03 +0530 Subject: [PATCH] (#CALM-40640) handle no auth in attrs in variable (#314) ### Summary Quick fix for when variable attrs don't have auth. (cherry picked from commit 7b9ff4b2f64a769e06b3c757ebd5638f521f4b2b) --- calm/dsl/api/util.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/calm/dsl/api/util.py b/calm/dsl/api/util.py index 8f8eb997..d9fcad68 100644 --- a/calm/dsl/api/util.py +++ b/calm/dsl/api/util.py @@ -126,7 +126,9 @@ def strip_entity_secret_variables( opts = variable.get("options", None) auth = None if opts: - auth = opts["attrs"].get("authentication", None) + attrs = opts.get("attrs", None) + if attrs: + auth = attrs.get("authentication", None) if auth and auth.get("auth_type") == "basic": basic_auth = auth.get("basic_auth") username = basic_auth.get("username")