From ed514ee429ad97c9e57248e5215a857b5c9ab51d Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 23 Sep 2002 08:24:51 +0000 Subject: [PATCH] import fixes git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1213 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/backends/rdbms_common.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/roundup/backends/rdbms_common.py b/roundup/backends/rdbms_common.py index b5572e3..f6fe029 100644 --- a/roundup/backends/rdbms_common.py +++ b/roundup/backends/rdbms_common.py @@ -1,4 +1,4 @@ -# $Id: rdbms_common.py,v 1.13 2002-09-23 08:17:05 richard Exp $ +# $Id: rdbms_common.py,v 1.14 2002-09-23 08:24:51 richard Exp $ # standard python modules import sys, os, time, re, errno, weakref, copy @@ -462,10 +462,13 @@ class Database(FileStorage, hyperdb.Database, roundupdb.Database): cl = self.classes[classname] cols, mls = self.determine_columns(cl.properties.items()) - # add the special props - node = node.copy() - node['creation'] = node['activity'] = date.Date() - node['creator'] = self.curuserid + # we'll be supplied these props if we're doing an import + if not node.has_key('creator'): + # add in the "calculated" properties (dupe so we don't affect + # calling code's node assumptions) + node = node.copy() + node['creation'] = node['activity'] = date.Date() + node['creator'] = self.curuserid # default the non-multilink columns for col, prop in cl.properties.items(): -- 2.30.2