mirror of
https://github.com/django/django.git
synced 2024-12-25 10:35:48 +00:00
Minor factorization.
This commit is contained in:
parent
122020fdb9
commit
73f38eb4d1
@ -153,10 +153,7 @@ class UpdateQuery(Query):
|
||||
|
||||
Updates are coalesced so that we only run one update query per ancestor.
|
||||
"""
|
||||
try:
|
||||
self.related_updates[model].append((field, None, value))
|
||||
except KeyError:
|
||||
self.related_updates[model] = [(field, None, value)]
|
||||
self.related_updates.setdefault(model, []).append((field, None, value))
|
||||
|
||||
def get_related_updates(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user