# HG changeset patch # User Sylvain Thénault # Date 1296132060 -3600 # Node ID fe9fd048e64c63b56162f5dc7e15937298c5b912 # Parent cf869016a823404b4031b0fb8882acf09c80e27d [selectors] one_line_rset selector should also work when rset is None but an entity is specified diff -r cf869016a823 -r fe9fd048e64c selectors.py --- a/selectors.py Thu Jan 27 13:40:01 2011 +0100 +++ b/selectors.py Thu Jan 27 13:41:00 2011 +0100 @@ -551,6 +551,8 @@ """Return 1 if the result set is of size 1, or greater but a specific row in the result set is specified ('row' argument). """ + if rset is None and 'entity' in kwargs: + return 1 if rset is not None and (row is not None or rset.rowcount == 1): return 1 return 0