mirror of
https://github.com/django/django.git
synced 2025-10-30 00:56:09 +00:00
Fixed #14366 -- Model.objects.none().values() now correctly returns a QuerySet with no items, rather than raising an Exception. Thanks to Carl Meyer for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14084 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -1021,7 +1021,7 @@ class EmptyQuerySet(QuerySet):
|
||||
pass
|
||||
|
||||
def _clone(self, klass=None, setup=False, **kwargs):
|
||||
c = super(EmptyQuerySet, self)._clone(klass, **kwargs)
|
||||
c = super(EmptyQuerySet, self)._clone(klass, setup=setup, **kwargs)
|
||||
c._result_cache = []
|
||||
return c
|
||||
|
||||
|
||||
Reference in New Issue
Block a user