diff --git a/roundup/roundupdb.py b/roundup/roundupdb.py
index cd9fa0e4b96acebe428ab3f26783455daab1c6e8..5b33f30f0154c8681cd65e2bcf9b128983d08523 100644 (file)
--- a/roundup/roundupdb.py
+++ b/roundup/roundupdb.py
-# $Id: roundupdb.py,v 1.6 2001-07-30 00:05:54 richard Exp $
+# $Id: roundupdb.py,v 1.7 2001-07-30 02:38:31 richard Exp $
import re, os, smtplib, socket
return self.user.create(username=address, address=address,
realname=realname)
+_marker = []
# XXX: added the 'creator' faked attribute
class Class(hyperdb.Class):
# Overridden methods:
for react in self.reactors['retire']:
react(self.db, self, nodeid, None)
- def get(self, nodeid, propname):
+ def get(self, nodeid, propname, default=_marker):
"""Attempts to get the "creation" or "activity" properties should
- do the right thing
+ do the right thing.
"""
if propname == 'creation':
journal = self.db.getjournal(self.classname, nodeid)
else:
return None
return self.db.user.lookup(name)
- return hyperdb.Class.get(self, nodeid, propname)
+ if default is not _marker:
+ return hyperdb.Class.get(self, nodeid, propname, default)
+ else:
+ return hyperdb.Class.get(self, nodeid, propname)
def getprops(self):
"""In addition to the actual properties on the node, these
'''
return open(self.filename(classname, nodeid), 'rb').read()
- def get(self, nodeid, propname):
+ def get(self, nodeid, propname, default=_marker):
''' trap the content propname and get it from the file
'''
if propname == 'content':
return self.getcontent(self.classname, nodeid)
- return Class.get(self, nodeid, propname)
+ if default is not _marker:
+ return Class.get(self, nodeid, propname, default)
+ else:
+ return Class.get(self, nodeid, propname)
def getprops(self):
''' In addition to the actual properties on the node, these methods
#
# $Log: not supported by cvs2svn $
+# Revision 1.6 2001/07/30 00:05:54 richard
+# Fixed IssueClass so that superseders links to its classname rather than
+# hard-coded to "issue".
+#
# Revision 1.5 2001/07/29 07:01:39 richard
# Added vim command to all source so that we don't get no steenkin' tabs :)
#