Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Minor factorization.

  • Loading branch information...
commit 73f38eb4d15d3da4707d8637178334c2f105ca19 1 parent 122020f
@aaugustin aaugustin authored
Showing with 1 addition and 4 deletions.
  1. +1 −4 django/db/models/sql/
5 django/db/models/sql/
@@ -153,10 +153,7 @@ def add_related_update(self, model, field, value):
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):
Please sign in to comment.
Something went wrong with that request. Please try again.