From 800e5ab7d2e25970515b9612f6e998d9434e76d4 Mon Sep 17 00:00:00 2001 From: Brandon Bradley Date: Sat, 1 Feb 2020 14:52:48 -0600 Subject: [PATCH] requested changes from review --- moto/cloudformation/models.py | 2 +- moto/cloudformation/responses.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/moto/cloudformation/models.py b/moto/cloudformation/models.py index c05783fb..b32d63b3 100644 --- a/moto/cloudformation/models.py +++ b/moto/cloudformation/models.py @@ -678,7 +678,7 @@ class CloudFormationBackend(BaseBackend): def list_stack_resources(self, stack_name_or_id): stack = self.get_stack(stack_name_or_id) if stack is None: - return [] + return None return stack.stack_resources def delete_stack(self, name_or_stack_id): diff --git a/moto/cloudformation/responses.py b/moto/cloudformation/responses.py index 7effb03f..77a3051f 100644 --- a/moto/cloudformation/responses.py +++ b/moto/cloudformation/responses.py @@ -229,7 +229,7 @@ class CloudFormationResponse(BaseResponse): stack_name_or_id = self._get_param("StackName") resources = self.cloudformation_backend.list_stack_resources(stack_name_or_id) - if not resources: + if resources is None: raise ValidationError(stack_name_or_id) template = self.response_template(LIST_STACKS_RESOURCES_RESPONSE)