From 320ec4e3e4e011ec975b4c441c871e8281d69c70 Mon Sep 17 00:00:00 2001 From: Tom McLaughlin Date: Thu, 2 Jan 2025 16:08:06 -0500 Subject: [PATCH] fix _get_account_tags() --- src/handlers/ListAccounts/function.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlers/ListAccounts/function.py b/src/handlers/ListAccounts/function.py index 410a32e..92eab0e 100644 --- a/src/handlers/ListAccounts/function.py +++ b/src/handlers/ListAccounts/function.py @@ -32,8 +32,8 @@ def _get_account_tags(accounts: List[AccountType]) -> List[AccountTypeWithTags]: tags = ORG_CLIENT.list_tags_for_resource( # Haven't seen a situation where Id is not present ResourceId=account.get('Id', '') - ) - account_with_tags = {**account, **tags} + ).get('Tags') + account_with_tags = {**account, 'Tags': tags} accounts_with_tags.append(account_with_tags) return accounts_with_tags