Using first() from cloned queryset
This commit is contained in:
		| @@ -159,11 +159,7 @@ class BaseQuerySet(object): | |||||||
|  |  | ||||||
|         queryset = self.clone() |         queryset = self.clone() | ||||||
|         queryset._ordering = [] |         queryset._ordering = [] | ||||||
|         try: |         return False if queryset.first() is None else True | ||||||
|             queryset[0] |  | ||||||
|             return True |  | ||||||
|         except IndexError: |  | ||||||
|             return False |  | ||||||
|  |  | ||||||
|     def __nonzero__(self): |     def __nonzero__(self): | ||||||
|         """ Same behaviour in Py2 """ |         """ Same behaviour in Py2 """ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user