Skip to content

Commit

Permalink
Merge pull request #113 from mcpeak/catch-non-ascii-in-dynamo
Browse files Browse the repository at this point in the history
Catch non unicode chars in Dynamo
  • Loading branch information
mcpeak authored Sep 6, 2018
2 parents 8f9fe48 + f854920 commit 78a1574
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion repokid/utils/dynamo.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@ def _empty_string_to_dynamo_replace(obj):
elif isinstance(obj, list):
return [_empty_string_to_dynamo_replace(elem) for elem in obj]
else:
if str(obj) == '':
try:
if str(obj) == '':
obj = DYNAMO_EMPTY_STRING
except UnicodeEncodeError:
obj = DYNAMO_EMPTY_STRING
return obj

0 comments on commit 78a1574

Please sign in to comment.