Skip to content

Commit e83ad6d

Browse files
author
Richard Jones
committed
import fixes
1 parent c80543d commit e83ad6d

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

roundup/backends/rdbms_common.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: rdbms_common.py,v 1.13 2002-09-23 08:17:05 richard Exp $
1+
# $Id: rdbms_common.py,v 1.14 2002-09-23 08:24:51 richard Exp $
22

33
# standard python modules
44
import sys, os, time, re, errno, weakref, copy
@@ -462,10 +462,13 @@ def addnode(self, classname, nodeid, node):
462462
cl = self.classes[classname]
463463
cols, mls = self.determine_columns(cl.properties.items())
464464

465-
# add the special props
466-
node = node.copy()
467-
node['creation'] = node['activity'] = date.Date()
468-
node['creator'] = self.curuserid
465+
# we'll be supplied these props if we're doing an import
466+
if not node.has_key('creator'):
467+
# add in the "calculated" properties (dupe so we don't affect
468+
# calling code's node assumptions)
469+
node = node.copy()
470+
node['creation'] = node['activity'] = date.Date()
471+
node['creator'] = self.curuserid
469472

470473
# default the non-multilink columns
471474
for col, prop in cl.properties.items():

0 commit comments

Comments
 (0)