selectors.py
branchstable
changeset 6905 fe9fd048e64c
parent 6881 a473bf557456
child 6908 f07dc0e8948d
equal deleted inserted replaced
6904:cf869016a823 6905:fe9fd048e64c
   549 @lltrace
   549 @lltrace
   550 def one_line_rset(cls, req, rset=None, row=None, **kwargs):
   550 def one_line_rset(cls, req, rset=None, row=None, **kwargs):
   551     """Return 1 if the result set is of size 1, or greater but a specific row in
   551     """Return 1 if the result set is of size 1, or greater but a specific row in
   552       the result set is specified ('row' argument).
   552       the result set is specified ('row' argument).
   553     """
   553     """
       
   554     if rset is None and 'entity' in kwargs:
       
   555         return 1
   554     if rset is not None and (row is not None or rset.rowcount == 1):
   556     if rset is not None and (row is not None or rset.rowcount == 1):
   555         return 1
   557         return 1
   556     return 0
   558     return 0
   557 
   559 
   558 
   560