diff roundup/backends/back_anydbm.py @ 2450:c45ed2413044

fixed lookup of "missing" Link values for new props in anydbm backend
author Richard Jones <richard@users.sourceforge.net>
date Sun, 13 Jun 2004 00:27:45 +0000
parents f37f3617b9e9
children 0e2a0c2c8142
line wrap: on
line diff
--- a/roundup/backends/back_anydbm.py	Sun Jun 13 00:27:27 2004 +0000
+++ b/roundup/backends/back_anydbm.py	Sun Jun 13 00:27:45 2004 +0000
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 # 
-#$Id: back_anydbm.py,v 1.153 2004-06-10 06:54:46 richard Exp $
+#$Id: back_anydbm.py,v 1.154 2004-06-13 00:27:45 richard Exp $
 '''This module defines a backend that saves the hyperdatabase in a
 database chosen by anydbm. It is guaranteed to always be available in python
 versions >2.1.1 (the dumbdbm fallback in 2.1.1 and earlier has several
@@ -1471,12 +1471,16 @@
                 if item.has_key(self.db.RETIRED_FLAG):
                     continue
                 for propname, itemids in propspec:
-                    # can't test if the item doesn't have this property
-                    if not item.has_key(propname):
-                        continue
                     if type(itemids) is not type({}):
                         itemids = {itemids:1}
 
+                    # special case if the item doesn't have this property
+                    if not item.has_key(propname):
+                        if itemids.has_key(None):
+                            l.append(id)
+                            break
+                        continue
+
                     # grab the property definition and its value on this item
                     prop = self.properties[propname]
                     value = item[propname]

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