mirror of
https://github.com/django/django.git
synced 2025-10-29 00:26:07 +00:00
Fixed #12142 -- EmptyQuerySet.update() no longer updates all rows in the database
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12171 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -1089,6 +1089,12 @@ class EmptyQuerySet(QuerySet):
|
||||
"""
|
||||
return self
|
||||
|
||||
def update(self, **kwargs):
|
||||
"""
|
||||
Don't update anything.
|
||||
"""
|
||||
return 0
|
||||
|
||||
# EmptyQuerySet is always an empty result in where-clauses (and similar
|
||||
# situations).
|
||||
value_annotation = False
|
||||
|
||||
Reference in New Issue
Block a user