Skip to content

Commit

Permalink
Fix incorrect handling of "False" k/v values (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavius authored May 20, 2020
1 parent 30e17ab commit cf2cc6e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,11 @@ def test_emd(self):

def test_put_items(self):
items = {
'bob': {'age': 42, 'feature': 'mustache'},
'bob': {
'age': 42,
'feature': 'mustache',
'female': False
},
'linda': {
'age': 40,
'feature': 'singing',
Expand Down
2 changes: 1 addition & 1 deletion v3io/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.3.8'
__version__ = '0.3.10'
5 changes: 4 additions & 1 deletion v3io/dataplane/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,10 @@ def _dict_to_typed_attributes(d):
else:
raise AttributeError('Attribute {0} has unsupported type {1}'.format(key, attribute_type))

typed_attributes[key] = {type_key: type_value or str(value)}
if type_value is None:
type_value = str(value)

typed_attributes[key] = {type_key: type_value}

return typed_attributes

Expand Down

0 comments on commit cf2cc6e

Please sign in to comment.