Skip to content

Commit 9bef5d5

Browse files
author
Alexander Smishlajev
committed
actor/activity update moved from Database.setnode() to Class.set_inner()
1 parent 80b965d commit 9bef5d5

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

roundup/backends/back_anydbm.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
#$Id: back_anydbm.py,v 1.181 2005-01-04 03:26:24 richard Exp $
18+
#$Id: back_anydbm.py,v 1.182 2005-01-06 17:41:10 a1s Exp $
1919
'''This module defines a backend that saves the hyperdatabase in a
2020
database chosen by anydbm. It is guaranteed to always be available in python
2121
versions >2.1.1 (the dumbdbm fallback in 2.1.1 and earlier has several
@@ -287,12 +287,6 @@ def setnode(self, classname, nodeid, node):
287287
'''
288288
self.dirtynodes.setdefault(classname, {})[nodeid] = 1
289289

290-
# update the activity time (dupe so we don't affect
291-
# calling code's node assumptions)
292-
node = node.copy()
293-
node['activity'] = date.Date()
294-
node['actor'] = self.getuid()
295-
296290
# can't set without having already loaded the node
297291
self.cache[classname][nodeid] = node
298292
self.savenode(classname, nodeid, node)
@@ -1249,6 +1243,10 @@ def set_inner(self, nodeid, **propvalues):
12491243
if not propvalues:
12501244
return propvalues
12511245

1246+
# update the activity time
1247+
node['activity'] = date.Date()
1248+
node['actor'] = self.db.getuid()
1249+
12521250
# do the set, and journal it
12531251
self.db.setnode(self.classname, nodeid, node)
12541252

0 commit comments

Comments
 (0)