diff roundup/hyperdb.py @ 130:204f99944de0

Fixed sorting by clicking on column headings.
author Richard Jones <richard@users.sourceforge.net>
date Sun, 29 Jul 2001 09:28:23 +0000
parents ce36f2962b94
children 9c5ddad06430
line wrap: on
line diff
--- a/roundup/hyperdb.py	Sun Jul 29 08:37:58 2001 +0000
+++ b/roundup/hyperdb.py	Sun Jul 29 09:28:23 2001 +0000
@@ -1,4 +1,4 @@
-# $Id: hyperdb.py,v 1.8 2001-07-29 08:27:40 richard Exp $
+# $Id: hyperdb.py,v 1.9 2001-07-29 09:28:23 richard Exp $
 
 # standard python modules
 import cPickle, re, string
@@ -633,7 +633,6 @@
             else:
                 m.append((entry[0], entry[1:]))
         group = m
-
         # now, sort the result
         def sortfun(a, b, sort=sort, group=group, properties=self.getprops(),
                 db = self.db, cl=self):
@@ -674,6 +673,9 @@
                     # nodes; or finally on  the node ids.
                     elif propclass.isLinkType:
                         link = db.classes[propclass.classname]
+                        if av is None and bv is not None: return -1
+                        if av is not None and bv is None: return 1
+                        if av is None and bv is None: return 0
                         if link.getprops().has_key('order'):
                             if dir == '+':
                                 r = cmp(link.get(av, 'order'),
@@ -788,6 +790,10 @@
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.8  2001/07/29 08:27:40  richard
+# Fixed handling of passed-in values in form elements (ie. during a
+# drill-down)
+#
 # Revision 1.7  2001/07/29 07:01:39  richard
 # Added vim command to all source so that we don't get no steenkin' tabs :)
 #

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