Skip to content

Commit 8b8d2a3

Browse files
author
Richard Jones
committed
[SF#564271] find() and new properties
1 parent c9eb286 commit 8b8d2a3

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ Fixed:
6666
. build htmlbase if tests are run using CVS checkout
6767
. #565979 ] code error in hyperdb.Class.find
6868
. #565996 ] The "Attach a File to this Issue" fails
69+
. #564271 ] find() and new properties
70+
6971

7072
2002-03-25 - 0.4.1
7173
Feature:

roundup/hyperdb.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: hyperdb.py,v 1.67 2002-06-11 05:02:37 richard Exp $
18+
# $Id: hyperdb.py,v 1.68 2002-06-11 06:52:03 richard Exp $
1919

2020
__doc__ = """
2121
Hyperdatabase implementation, especially field types.
@@ -793,11 +793,14 @@ def find(self, **propspec):
793793
# ok, now do the find
794794
cldb = self.db.getclassdb(self.classname)
795795
l = []
796-
for id in self.db.getnodeids(self.classname, cldb):
797-
node = self.db.getnode(self.classname, id, cldb)
796+
for id in self.db.getnodeids(self.classname, db=cldb):
797+
node = self.db.getnode(self.classname, id, db=cldb)
798798
if node.has_key(self.db.RETIRED_FLAG):
799799
continue
800800
for propname, nodeid in propspec:
801+
# can't test if the node doesn't have this property
802+
if not node.has_key(propname):
803+
continue
801804
prop = self.properties[propname]
802805
property = node[propname]
803806
if isinstance(prop, Link) and nodeid == property:
@@ -1158,6 +1161,9 @@ def Choice(name, db, *options):
11581161

11591162
#
11601163
# $Log: not supported by cvs2svn $
1164+
# Revision 1.67 2002/06/11 05:02:37 richard
1165+
# . #565979 ] code error in hyperdb.Class.find
1166+
#
11611167
# Revision 1.66 2002/05/25 07:16:24 rochecompaan
11621168
# Merged search_indexing-branch with HEAD
11631169
#

0 commit comments

Comments
 (0)