Skip to content

Commit

Permalink
If items is none then set it to an empty list
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathew Moon committed Jun 17, 2021
1 parent d31a6d9 commit c8f4f08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -5,7 +5,7 @@

setup(
name='appsync-tools',
version='2.0.4',
version='2.0.5',
description='Tools for handling appsync responses and routes.',
author='Mathew Moon',
author_email='mmoon@quinovas.com',
Expand Down
2 changes: 1 addition & 1 deletion src/appsync_tools/__init__.py
Expand Up @@ -28,7 +28,7 @@ def prettyParseAurora(results, type_attribute=None):


def prettyParseDynamo(items, type_attribute=None):
items = items.get('Items') or items.get('Item')
items = items.get('Items') or items.get('Item') or []

if isinstance(items, dict):
is_single = True
Expand Down

0 comments on commit c8f4f08

Please sign in to comment.