diff roundup/backends/rdbms_common.py @ 1920:f9316d2cd5ba

Fixed retirement of items in rdbms imports [SF#841355] Fixed bug in looking up journal of newly-created items in *dbm backends
author Richard Jones <richard@users.sourceforge.net>
date Fri, 14 Nov 2003 00:11:19 +0000
parents 2b0ab61db194
children 3bdd34547fa7
line wrap: on
line diff
--- a/roundup/backends/rdbms_common.py	Thu Nov 13 06:03:42 2003 +0000
+++ b/roundup/backends/rdbms_common.py	Fri Nov 14 00:11:19 2003 +0000
@@ -1,4 +1,4 @@
-# $Id: rdbms_common.py,v 1.69 2003-11-12 03:42:12 richard Exp $
+# $Id: rdbms_common.py,v 1.70 2003-11-14 00:11:19 richard Exp $
 ''' Relational database (SQL) backend common code.
 
 Basics:
@@ -1236,7 +1236,7 @@
             elif isinstance(proptype, hyperdb.Password):
                 value = str(value)
             l.append(repr(value))
-        l.append(self.is_retired(nodeid))
+        l.append(repr(self.is_retired(nodeid)))
         return l
 
     def import_list(self, propnames, proplist):
@@ -1293,6 +1293,9 @@
         if newid is None:
             newid = self.db.newid(self.classname)
 
+        # add the node and journal
+        self.db.addnode(self.classname, newid, d)
+
         # retire?
         if retire:
             # use the arg for __retired__ to cope with any odd database type
@@ -1303,9 +1306,6 @@
                 print >>hyperdb.DEBUG, 'retire', (self, sql, newid)
             self.db.cursor.execute(sql, (1, newid))
 
-        # add the node and journal
-        self.db.addnode(self.classname, newid, d)
-
         # extract the extraneous journalling gumpf and nuke it
         if d.has_key('creator'):
             creator = d['creator']

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