Commit Graph
7 Commits
Author SHA1 Message Date
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