diff --git a/gcloud/datastore/helpers.py b/gcloud/datastore/helpers.py index 5f3965213729..8ab6d571d6c6 100644 --- a/gcloud/datastore/helpers.py +++ b/gcloud/datastore/helpers.py @@ -7,7 +7,7 @@ from gcloud.datastore.key import Key -INT64 = Int64ValueChecker().CheckValue +check_int64_value = Int64ValueChecker().CheckValue def get_protobuf_attribute_and_value(val): @@ -56,7 +56,8 @@ def get_protobuf_attribute_and_value(val): elif isinstance(val, float): name, value = 'double', val elif isinstance(val, (int, long)): - name, value = 'integer', INT64(val) + check_int64_value(val) # This will raise an exception if invalid. + name, value = 'integer', val elif isinstance(val, basestring): name, value = 'string', val