diff options
| author | Дилян Палаузов <dilyanpalauzov@users.noreply.github.com> | 2017-11-13 16:15:49 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-11-14 10:52:52 -0500 |
| commit | 23bf4ad87f86f44a5ecf9aea722ced76fe7b7fdf (patch) | |
| tree | b6951dcd0887643851803becb4ec608eeab6ba68 /django/db/models/sql | |
| parent | a2ec1e6b2d05a1de86a6d02d1e035250b9fefa77 (diff) | |
Fixed #28795 -- Removed 'not in' checks and used dict.setdefault().
Diffstat (limited to 'django/db/models/sql')
| -rw-r--r-- | django/db/models/sql/query.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 57da2fe68b..e7456de037 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -692,8 +692,7 @@ class Query: # in the parent list. Again, it must be mentioned to ensure that # only "must include" fields are pulled in. for model in orig_opts.get_parent_list(): - if model not in seen: - seen[model] = set() + seen.setdefault(model, set()) for model, values in seen.items(): callback(target, model, values) |
