mirror of
https://github.com/Hopiu/django-cachalot.git
synced 2026-05-10 05:34:45 +00:00
Fixes the AttributeError happening when excluding through a M2M on a multi-table inheritance child model.
This commit is contained in:
parent
aa6c93334b
commit
e89fe83992
1 changed files with 4 additions and 1 deletions
|
|
@ -67,7 +67,10 @@ def _get_tables_from_sql(connection, lowercased_sql):
|
|||
def _find_subqueries(children):
|
||||
for child in children:
|
||||
if isinstance(child, SubqueryConstraint):
|
||||
yield child.query_object.query
|
||||
if isinstance(child.query_object, Query):
|
||||
yield child.query_object
|
||||
else:
|
||||
yield child.query_object.query
|
||||
else:
|
||||
rhs = None
|
||||
if DJANGO_GTE_1_7:
|
||||
|
|
|
|||
Loading…
Reference in a new issue