Ticket #22050: patch.py

File patch.py, 579 bytes (added by lovasb, 2 years ago)

Patch.py

Line 
1diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
2index 79a4459..33f066b 100644
3--- a/django/db/models/sql/query.py
4+++ b/django/db/models/sql/query.py
5@@ -585,7 +585,7 @@ class Query(object):
6         must_include = {orig_opts.concrete_model: set([orig_opts.pk])}
7         for field_name in field_names:
8             parts = field_name.split(LOOKUP_SEP)
9-            cur_model = self.model
10+            cur_model = self.model._meta.concrete_model
11             opts = orig_opts
12             for name in parts[:-1]:
13                 old_model = cur_model
Back to Top