mirror of
https://github.com/Hopiu/django-cachalot.git
synced 2026-03-16 21:30:23 +00:00
* Combine child_class passing to minimize if's Co-authored-by: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com>
This commit is contained in:
parent
f40a56dfe1
commit
71dcf73dd7
1 changed files with 1 additions and 6 deletions
|
|
@ -103,7 +103,7 @@ def _find_subqueries_in_where(children):
|
|||
yield grand_child
|
||||
elif child_class is ExtraWhere:
|
||||
raise IsRawQuery
|
||||
elif child_class is NothingNode:
|
||||
elif child_class in (NothingNode, Subquery, Exists):
|
||||
pass
|
||||
else:
|
||||
rhs = child.rhs
|
||||
|
|
@ -112,11 +112,6 @@ def _find_subqueries_in_where(children):
|
|||
yield rhs
|
||||
elif rhs_class is QuerySet:
|
||||
yield rhs.query
|
||||
elif rhs_class is Subquery or rhs_class is Exists:
|
||||
try:
|
||||
yield rhs.query
|
||||
except:
|
||||
yield rhs.queryset.query
|
||||
elif rhs_class in UNCACHABLE_FUNCS:
|
||||
raise UncachableQuery
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue