bug with dynamo Layer2.build_key_from_values()

18 views
Skip to first unread message

Andy Davidoff

unread,
Feb 13, 2012, 1:13:51 AM2/13/12
to boto-dev
Numeric range keys of zero value were not correctly included in the
key.


Index: layer2.py
===================================================================
--- layer2.py (revision 3098)
+++ layer2.py (working copy)
@@ -280,7 +280,7 @@
msg = 'Hashkey must be of type: %s' %
schema.hash_key_type
raise TypeError(msg)
dynamodb_key['HashKeyElement'] = dynamodb_value
- if range_key:
+ if range_key is not None:
dynamodb_value = self.dynamize_value(range_key)
if dynamodb_value.keys()[0] != schema.range_key_type:
msg = 'RangeKey must be of type: %s' %
schema.range_key_type

mitch

unread,
Feb 13, 2012, 11:56:03 AM2/13/12
to boto-dev
Thanks for the report. See:

https://github.com/boto/boto/issues/576
Reply all
Reply to author
Forward
0 new messages