1. Jannis Leidel
  2. johnny-cache

Commits

Jason Moiron  committed 8b2be68

add a check for 1.1.x to guard against trying to iterate over WhereNodes; this should take care of #30, the attached patch did not pass johnny's tests for django-1.1.3

  • Participants
  • Parent commits fa8bd81
  • Branches default

Comments (0)

Files changed (1)

File johnny/cache.py

View file
  • Ignore whitespace
     if query.where and query.where.children and isinstance(query.where.children[0], WhereNode):
         where_node = query.where.children[0]
         for child in where_node.children:
+            if isinstance(child, WhereNode):
+                continue
             for item in child:
                 if isinstance(item, QueryWrapper):
                     tables += parse_tables_from_sql(item.data[0])