diff roundup/backends/rdbms_common.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 f1c9873496f0
children 1cd01cf106e1
line wrap: on
line diff
--- a/roundup/backends/rdbms_common.py	Thu Oct 07 06:04:26 2004 +0000
+++ b/roundup/backends/rdbms_common.py	Thu Oct 07 06:09:41 2004 +0000
@@ -1,4 +1,4 @@
-# $Id: rdbms_common.py,v 1.131 2004-09-26 14:38:54 a1s Exp $
+# $Id: rdbms_common.py,v 1.132 2004-10-07 06:08:42 richard Exp $
 ''' Relational database (SQL) backend common code.
 
 Basics:
@@ -2154,6 +2154,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 = []

Roundup Issue Tracker: http://roundup-tracker.org/