Return empty list instead of None for tags

If a stack has no tags, return an empty list [] instead of None for its
tags list.

Change-Id: I3c3c083d7261172d08b933de7c63b6a489ed6ccd
Depends-On: https://review.opendev.org/687769
Task: 37009
This commit is contained in:
Zane Bitter 2019-10-10 15:49:55 -04:00
parent 2540dfd450
commit 6e3fd87340
2 changed files with 2 additions and 2 deletions

View File

@ -221,7 +221,7 @@ def format_stack(stack, preview=False, resolve_outputs=True):
rpc_api.STACK_OWNER: stack.username,
rpc_api.STACK_PARENT: stack.owner_id,
rpc_api.STACK_USER_PROJECT_ID: stack.stack_user_project_id,
rpc_api.STACK_TAGS: stack.tags or None,
rpc_api.STACK_TAGS: stack.tags,
}
if not preview:

View File

@ -398,7 +398,7 @@ class FormatTest(common.HeatTestCase):
'outputs': [],
'template_description': 'No description',
'timeout_mins': None,
'tags': None,
'tags': [],
'parameters': {
'AWS::Region': 'ap-southeast-1',
'AWS::StackId': aws_id,