Mercurial > p > roundup > code
diff roundup/backends/back_mysql.py @ 2720:15d945dff53d
add sanity check for sort and group on same property [SF#1033477]
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 07 Oct 2004 06:09:41 +0000 |
| parents | ca2ee58c8310 |
| children | 1cd01cf106e1 |
line wrap: on
line diff
--- a/roundup/backends/back_mysql.py Thu Oct 07 06:04:26 2004 +0000 +++ b/roundup/backends/back_mysql.py Thu Oct 07 06:09:41 2004 +0000 @@ -651,6 +651,10 @@ where.append('_%s.id in (%s)'%(cn, s)) args = args + v + # sanity check: sorting *and* grouping on the same property? + if group[1] == sort[1]: + sort = (None, None) + # "grouping" is just the first-order sorting in the SQL fetch orderby = [] ordercols = []
