col may be None
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 28 May 2009 20:05:54 +0200
changeset 1994 56a235af050e
parent 1989 8c8dead642f7
child 1995 ec95eaa2b711
col may be None
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)