Commit Graph
11 Commits
Author SHA1 Message Date
Jonathan Prates 819ff2a902 Renamed to has_data() 2014-05-29 14:36:30 -03:00
Jonathan Prates c744104a18 Added test with meta 2014-05-29 10:53:20 -03:00
Jonathan Prates c87801f0a9 Using first() from cloned queryset 2014-05-28 17:26:28 -03:00
Jonathan Prates 39735594bd Removed blank line 2014-05-28 17:15:48 -03:00
Jonathan Prates 30964f65e4 Remove orderby in if stmt 2014-05-28 17:06:15 -03:00
Jonathan Prates ee0c7fd8bf Change for loop to self.first() 2014-05-28 13:21:00 -03:00
Jonathan Prates dfdecef8e7 Fix py2 and py3 2014-05-28 09:40:22 -03:00
Jonathan Prates edcdfeb057 Fix syntax error 2014-05-28 09:03:12 -03:00
Jonathan Prates 47f0de9836 Py3 fix 2014-05-28 08:36:57 -03:00
Jonathan Prates 9ba657797e Authors updated according guideline 2014-05-28 08:33:22 -03:00
Jonathan Prates 3faf3c84be Avoid to open all documents from cursors in an if stmt
Using a cursos in an if statement:

cursor = Collection.objects

	if cursor:
		(...)

Will open all documents, because there are not an __nonzero__ method.
This change check only one document (if present) and returns True or False.
2014-05-27 16:33:38 -03:00