diff options
author | Zane Bitter <zbitter@redhat.com> | 2019-10-10 15:49:55 -0400 |
---|---|---|
committer | Zane Bitter <zbitter@redhat.com> | 2019-10-10 17:40:42 -0400 |
commit | 6e3fd87340e7225a6e2d5987efb8462056384524 (patch) | |
tree | 46fb34bf79971433372893f9ba4789106bcdf9da | |
parent | 2540dfd450d846c268c9117304abac83b149fe4a (diff) | |
download | heat-6e3fd87340e7225a6e2d5987efb8462056384524.tar.gz |
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
-rw-r--r-- | heat/engine/api.py | 2 | ||||
-rw-r--r-- | heat/tests/test_engine_api_utils.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/heat/engine/api.py b/heat/engine/api.py index 5ad560faa..ddffaa256 100644 --- a/heat/engine/api.py +++ b/heat/engine/api.py @@ -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: diff --git a/heat/tests/test_engine_api_utils.py b/heat/tests/test_engine_api_utils.py index f21687da1..44a073157 100644 --- a/heat/tests/test_engine_api_utils.py +++ b/heat/tests/test_engine_api_utils.py @@ -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, |