Mercurial > p > roundup > code
diff roundup/backends/rdbms_common.py @ 3085:67a6567e14c2 maint-0.8
actor/activity update moved from Database.setnode() to Class.set_inner()
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Thu, 06 Jan 2005 17:59:38 +0000 |
| parents | 7c63152c637f |
| children | 406862712b7d |
line wrap: on
line diff
--- a/roundup/backends/rdbms_common.py Wed Jan 05 22:36:30 2005 +0000 +++ b/roundup/backends/rdbms_common.py Thu Jan 06 17:59:38 2005 +0000 @@ -1,4 +1,4 @@ -# $Id: rdbms_common.py,v 1.142.2.1 2005-01-04 03:28:07 richard Exp $ +# $Id: rdbms_common.py,v 1.142.2.2 2005-01-06 17:58:52 a1s Exp $ ''' Relational database (SQL) backend common code. Basics: @@ -767,8 +767,8 @@ ''' Change the specified node. ''' if __debug__: - self.config.logging.getLogger('hyperdb').debug('setnode %s%s %r'%(classname, - nodeid, values)) + self.config.logging.getLogger('hyperdb').debug('setnode %s%s %r' + % (classname, nodeid, values)) # clear this node out of the cache if it's in there key = (classname, nodeid) @@ -776,11 +776,6 @@ del self.cache[key] self.cache_lru.remove(key) - # add the special props - values = values.copy() - values['activity'] = date.Date() - values['actor'] = self.getuid() - cl = self.classes[classname] props = cl.getprops() @@ -1529,6 +1524,9 @@ raise IndexError, 'Requested item is retired' num_re = re.compile('^\d+$') + # make a copy of the values dictionary - we'll modify the contents + propvalues = propvalues.copy() + # if the journal value is to be different, store it in here journalvalues = {} @@ -1695,6 +1693,10 @@ if not propvalues: return propvalues + # update the activity time + propvalues['activity'] = date.Date() + propvalues['actor'] = self.db.getuid() + # do the set, and journal it self.db.setnode(self.classname, nodeid, propvalues, multilink_changes)
