comparison roundup/backends/rdbms_common.py @ 1189:23b8d1e87fe3

import fixes
author Richard Jones <richard@users.sourceforge.net>
date Mon, 23 Sep 2002 08:24:51 +0000
parents 84e40c9bcd99
children e0032f4ab334
comparison
equal deleted inserted replaced
1188:2add60346bf7 1189:23b8d1e87fe3
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 $
2 2
3 # standard python modules 3 # standard python modules
4 import sys, os, time, re, errno, weakref, copy 4 import sys, os, time, re, errno, weakref, copy
5 5
6 # roundup modules 6 # roundup modules
460 print >>hyperdb.DEBUG, 'addnode', (self, classname, nodeid, node) 460 print >>hyperdb.DEBUG, 'addnode', (self, classname, nodeid, node)
461 # gadfly requires values for all non-multilink columns 461 # gadfly requires values for all non-multilink columns
462 cl = self.classes[classname] 462 cl = self.classes[classname]
463 cols, mls = self.determine_columns(cl.properties.items()) 463 cols, mls = self.determine_columns(cl.properties.items())
464 464
465 # add the special props 465 # we'll be supplied these props if we're doing an import
466 node = node.copy() 466 if not node.has_key('creator'):
467 node['creation'] = node['activity'] = date.Date() 467 # add in the "calculated" properties (dupe so we don't affect
468 node['creator'] = self.curuserid 468 # calling code's node assumptions)
469 node = node.copy()
470 node['creation'] = node['activity'] = date.Date()
471 node['creator'] = self.curuserid
469 472
470 # default the non-multilink columns 473 # default the non-multilink columns
471 for col, prop in cl.properties.items(): 474 for col, prop in cl.properties.items():
472 if not isinstance(col, Multilink): 475 if not isinstance(col, Multilink):
473 if not node.has_key(col): 476 if not node.has_key(col):

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