# HG changeset patch
# User Sylvain Thénault <sylvain.thenault@logilab.fr>
# Date 1243533954 -7200
# Node ID 56a235af050ee7b6c576ac2f49e461ab490aa770
# Parent  8c8dead642f74d3bd4f5f7954639c55bae01a0a1
col may be None

diff -r 8c8dead642f7 -r 56a235af050e selectors.py
--- a/selectors.py	Thu May 28 18:46:04 2009 +0200
+++ b/selectors.py	Thu May 28 20:05:54 2009 +0200
@@ -245,6 +245,7 @@
         if kwargs.get('entity'):
             score = self.score_entity(kwargs['entity'])
         elif row is None:
+            col = col or 0
             for row, rowvalue in enumerate(rset.rows):
                 if rowvalue[col] is None: # outer join
                     continue
@@ -255,6 +256,7 @@
                     return escore
                 score += escore
         else:
+            col = col or 0
             etype = rset.description[row][col]
             if etype is not None: # outer join
                 score = self.score(req, rset, row, col)