mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
This commit is contained in:
parent
06acb3445f
commit
a84344bc53
3 changed files with 28 additions and 2 deletions
|
@ -632,6 +632,8 @@ class QuerySet(object):
|
|||
self._for_write = True
|
||||
query = self.query.clone(sql.UpdateQuery)
|
||||
query.add_update_values(kwargs)
|
||||
# Clear any annotations so that they won't be present in subqueries.
|
||||
query._annotations = None
|
||||
with transaction.atomic(using=self.db, savepoint=False):
|
||||
rows = query.get_compiler(self.db).execute_sql(CURSOR)
|
||||
self._result_cache = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue