Code

Fix bug in setting activity.
authorgmcm <gmcm@57a73879-2fb5-44c3-a270-3262357dd7e2>
Wed, 17 Jul 2002 13:28:37 +0000 (13:28 +0000)
committergmcm <gmcm@57a73879-2fb5-44c3-a270-3262357dd7e2>
Wed, 17 Jul 2002 13:28:37 +0000 (13:28 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@886 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/backends/back_metakit.py

index be582568c6e447809e02ce5b5d8fabe737ee6088..1c93af77592aa747a41b08f153f75cd3800c10d1 100755 (executable)
@@ -193,7 +193,7 @@ _marker = []
 
 _ALLOWSETTINGPRIVATEPROPS = 0
 
-class Class:    # no, I'm not going to subclass the existing!
+class Class:    
     privateprops = None
     def __init__(self, db, classname, **properties):
         self.db = weakref.proxy(db)
@@ -461,7 +461,7 @@ class Class:    # no, I'm not going to subclass the existing!
         # nothing to do?
         if not propvalues:
             return
-        if not row.activity:
+        if not propvalues.has_key('activity'):
             row.activity = int(time.time())
         if isnew:
             if not row.creation:
@@ -720,12 +720,11 @@ class Class:    # no, I'm not going to subclass the existing!
                 try:
                     prop = getattr(v, propname)
                 except AttributeError:
-                    # I can't sort on 'activity', cause it's psuedo!!
                     continue
                 if isreversed:
                     rev.append(prop)
                 sortspec.append(prop)
-            v = v.sortrev(sortspec, rev)[:] #XXX Aaaabh
+            v = v.sortrev(sortspec, rev)[:] #XXX Metakit bug
         #print "filter sort   at %s" % time.time() 
             
         rslt = []