File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -183,4 +183,5 @@ that much better:
183183 * Joe Friedl (https://github.com/grampajoe)
184184 * Daniel Ward (https://github.com/danielward)
185185 * Aniket Deshpande (https://github.com/anicake)
186- * rfkrocktk (https://github.com/rfkrocktk)
186+ * rfkrocktk (https://github.com/rfkrocktk)
187+ * Gustavo Andrés Angulo (https://github.com/woakas)
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ Changelog
44
55Changes in 0.8.5
66================
7+ - Fixed count and none bug (#498)
78- Fixed bug with .only() and DictField with digit keys (#496)
89- Added user_permissions to Django User object (#491, #492)
910- Fix updating Geo Location fields (#488)
Original file line number Diff line number Diff line change @@ -2882,6 +2882,19 @@ class Post(Document):
28822882
28832883 self .assertEqual (10 , Post .objects .limit (5 ).skip (5 ).count (with_limit_and_skip = False ))
28842884
2885+ def test_count_and_none (self ):
2886+ """Test count works with None()"""
2887+
2888+ class MyDoc (Document ):
2889+ pass
2890+
2891+ MyDoc .drop_collection ()
2892+ for i in xrange (0 , 10 ):
2893+ MyDoc ().save ()
2894+
2895+ self .assertEqual (MyDoc .objects .count (), 10 )
2896+ self .assertEqual (MyDoc .objects .none ().count (), 0 )
2897+
28852898 def test_call_after_limits_set (self ):
28862899 """Ensure that re-filtering after slicing works
28872900 """
You can’t perform that action at this time.
0 commit comments