X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=roundup%2Fbackends%2Fback_anydbm.py;h=12ba0e49153b6668eb7b20fd4b36587c190929f8;hb=9c438c70783bcdc1f659796bc95404848cd61786;hp=2a338a0bb7ba250a088606c5c0ab9c454726638c;hpb=f83c686d5d11f7f036de4eb093a7f1b535697c55;p=roundup.git diff --git a/roundup/backends/back_anydbm.py b/roundup/backends/back_anydbm.py index 2a338a0..12ba0e4 100644 --- a/roundup/backends/back_anydbm.py +++ b/roundup/backends/back_anydbm.py @@ -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.73 2002-09-10 00:11:49 richard Exp $ +#$Id: back_anydbm.py,v 1.75 2002-09-10 12:44:42 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 @@ -976,14 +976,9 @@ class Class(hyperdb.Class): raise ValueError, 'Journalling is disabled for this class' journal = self.db.getjournal(self.classname, nodeid) if journal: - name = self.db.getjournal(self.classname, nodeid)[0][2] + return self.db.getjournal(self.classname, nodeid)[0][2] else: - return None - try: - return self.db.user.lookup(name) - except KeyError: - # the journaltag user doesn't exist any more - return None + return self.db.journaltag # get the property (raises KeyErorr if invalid) prop = self.properties[propname] @@ -1006,7 +1001,7 @@ class Class(hyperdb.Class): return d[propname] - # XXX not in spec + # not in spec def getnode(self, nodeid, cache=1): ''' Return a convenience wrapper for the node. @@ -1373,7 +1368,7 @@ class Class(hyperdb.Class): cldb.close() raise KeyError, keyvalue - # XXX: change from spec - allows multiple props to match + # change from spec - allows multiple props to match def find(self, **propspec): '''Get the ids of nodes in this class which link to the given nodes. @@ -1734,7 +1729,9 @@ class Class(hyperdb.Class): d['id'] = String() d['creation'] = hyperdb.Date() d['activity'] = hyperdb.Date() - d['creator'] = hyperdb.Link("user") + # can't be a link to user because the user might have been + # retired since the journal entry was created + d['creator'] = hyperdb.String() return d def addprop(self, **properties): @@ -1884,7 +1881,7 @@ class FileClass(Class): self.db.indexer.add_text((self.classname, nodeid, 'content'), content, mime_type) -# XXX deviation from spec - was called ItemClass +# deviation from spec - was called ItemClass class IssueClass(Class, roundupdb.IssueClass): # Overridden methods: def __init__(self, db, classname, **properties):