mirror of
https://github.com/Hopiu/django-cachalot.git
synced 2026-03-16 21:30:23 +00:00
Handle queryset implementations without lhs/rhs attribute (#204)
The `ExtraJoinRestriction` class used by django-taggit lacks the attributes "rhs" and "lhs". Thus projects cannot use django-taggit together with cachalot. Closes: #121
This commit is contained in:
parent
c8d6af575a
commit
42af2e0126
1 changed files with 7 additions and 2 deletions
|
|
@ -135,10 +135,15 @@ def _find_subqueries_in_where(children):
|
|||
elif child_class is NothingNode:
|
||||
pass
|
||||
else:
|
||||
rhs = _find_rhs_lhs_subquery(child.rhs)
|
||||
try:
|
||||
child_rhs = child.rhs
|
||||
child_lhs = child.lhs
|
||||
except AttributeError:
|
||||
raise UncachableQuery
|
||||
rhs = _find_rhs_lhs_subquery(child_rhs)
|
||||
if rhs is not None:
|
||||
yield rhs
|
||||
lhs = _find_rhs_lhs_subquery(child.lhs)
|
||||
lhs = _find_rhs_lhs_subquery(child_lhs)
|
||||
if lhs is not None:
|
||||
yield lhs
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue