We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1779aec commit 20339a5Copy full SHA for 20339a5
1 file changed
gcloud/datastore/helpers.py
@@ -7,7 +7,7 @@
7
8
from gcloud.datastore.key import Key
9
10
-INT64 = Int64ValueChecker().CheckValue
+check_int64_value = Int64ValueChecker().CheckValue
11
12
13
def get_protobuf_attribute_and_value(val):
@@ -56,7 +56,8 @@ def get_protobuf_attribute_and_value(val):
56
elif isinstance(val, float):
57
name, value = 'double', val
58
elif isinstance(val, (int, long)):
59
- name, value = 'integer', INT64(val)
+ check_int64_value(val) # This will raise an exception if invalid.
60
+ name, value = 'integer', val
61
elif isinstance(val, basestring):
62
name, value = 'string', val
63
0 commit comments