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

Comments (0)

Files changed (1)

     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([0])