|
15 | 15 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
16 | 16 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
17 | 17 | # |
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 $ |
19 | 19 | '''This module defines a backend that saves the hyperdatabase in a |
20 | 20 | database chosen by anydbm. It is guaranteed to always be available in python |
21 | 21 | 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): |
287 | 287 | ''' |
288 | 288 | self.dirtynodes.setdefault(classname, {})[nodeid] = 1 |
289 | 289 |
|
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 | | - |
296 | 290 | # can't set without having already loaded the node |
297 | 291 | self.cache[classname][nodeid] = node |
298 | 292 | self.savenode(classname, nodeid, node) |
@@ -1249,6 +1243,10 @@ def set_inner(self, nodeid, **propvalues): |
1249 | 1243 | if not propvalues: |
1250 | 1244 | return propvalues |
1251 | 1245 |
|
| 1246 | + # update the activity time |
| 1247 | + node['activity'] = date.Date() |
| 1248 | + node['actor'] = self.db.getuid() |
| 1249 | + |
1252 | 1250 | # do the set, and journal it |
1253 | 1251 | self.db.setnode(self.classname, nodeid, node) |
1254 | 1252 |
|
|
0 commit comments