Skip to content

Commit

Permalink
(#CALM-40640) handle no auth in attrs in variable (nutanix#314)
Browse files Browse the repository at this point in the history
### Summary
Quick fix for when variable attrs don't have auth.

(cherry picked from commit 7b9ff4b2f64a769e06b3c757ebd5638f521f4b2b)
  • Loading branch information
Abhishekntnx authored and dwivediprab committed Mar 15, 2024
1 parent 4b51cba commit df8e626
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion calm/dsl/api/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit df8e626

Please sign in to comment.