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