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 Sep 2, 2021. It is now read-only.
The statement should be IS NULL for None value, not = NULL. As a result BDObject.findBy() returns [] in that case. The following test succeeds if name is a string:
diff --git a/twistar/tests/test_dbobject.py b/twistar/tests/test_dbobject.py
index 6611e90..d7001d9 100644
--- a/twistar/tests/test_dbobject.py+++ b/twistar/tests/test_dbobject.py@@ -84,6 +84,12 @@ class DBObjectTest(unittest.TestCase):
resultids = [result.id for result in results]
self.assertEqual(ids, resultids)
+ @inlineCallbacks+ def test_null(self):+ name = None+ user = yield User(first_name=name).save()+ users = yield User.findBy(first_name=name)+ self.assertEqual(user, users[0])
@inlineCallbacks
def test_count(self):
The text was updated successfully, but these errors were encountered:
The statement should be
IS NULL
for None value, not= NULL
. As a resultBDObject.findBy()
returns[]
in that case. The following test succeeds if name is a string:The text was updated successfully, but these errors were encountered: