You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 25, 2023. It is now read-only.
What steps will reproduce the problem?
1. declare KeyProperty on Model
class Test(model.Model):
k = model.KeyProperty()
value = model.IntegerProperty()
2. filtering KeyProperty with None
Test.query(Test.k == None).count() # error
Test.query(Test.k != None).count() # error also
What is the expected output? What do you see instead?
File
"/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-de
fault.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/_we
bapp25.py", line 701, in __call__
handler.get(*groups)
File "/Users/reiot/Documents/Works/ndbtest/main.py", line 91, in get
count = Test.query(Test.k == None).count() # error
File "/Users/reiot/Documents/Works/ndbtest/ndb/model.py", line 500, in __eq__
return self._comparison('=', value)
File "/Users/reiot/Documents/Works/ndbtest/ndb/model.py", line 491, in
_comparison
return FilterNode(self._name, op, self._datastore_type(value))
File "/Users/reiot/Documents/Works/ndbtest/ndb/model.py", line 1138, in
_datastore_type
return datastore_types.Key(value.urlsafe())
AttributeError: 'NoneType' object has no attribute 'urlsafe'
What version of the product are you using? On what operating system?
0.7 & 0.8
Please provide any additional information below.
Original issue reported on code.google.com by Reio...@gmail.com on 11 Oct 2011 at 11:16
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
Reio...@gmail.com
on 11 Oct 2011 at 11:16The text was updated successfully, but these errors were encountered: