Skip to content

Commit

Permalink
remove account's id and name from variables, if empty exclude it
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanLoscalzo committed May 16, 2023
1 parent 1e6a4d3 commit 0b34e6d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions iambic/plugins/v0_1_0/aws/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,17 @@ def dict(
exclude_defaults=exclude_defaults,
exclude_none=exclude_none,
)

if "variables" in resp:
resp["variables"] = [
i
for i in resp.get("variables", [])
if i.get("key") not in ["account_id", "account_name"]
]

if resp["variables"] == []:
resp.pop("variables")

return sort_dict(
resp,
[
Expand Down

0 comments on commit 0b34e6d

Please sign in to comment.