Skip to content

Commit 429c408

Browse files
author
Johannes Gijsbers
committed
Use Database.setnode instead of self.set or self.set_inner here...
...as Database.setnode doesn't update the "activity" or "actor" properties.
1 parent 80b6c8e commit 429c408

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

roundup/backends/back_tsearch2.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,11 @@ def export_files(self, dirname, nodeid):
170170
fp.write(self.get(nodeid, "content", default=''))
171171
fp.close()
172172

173-
# XXX: this unfortunately sets the activity on the node to "now", causing
174-
# testImportExport to fail. We either need to create a way to disable
175-
# setting activity/actor or we need to override import_list so it already
176-
# includes the "content" property. However, that would mean changing its
177-
# call signature, as we need to know `dirname`.
178173
def import_files(self, dirname, nodeid):
179174
source = self.exportFilename(dirname, nodeid)
180175

181176
fp = open(source, "r")
182-
self.set(nodeid, content=fp.read())
177+
# Use Database.setnode instead of self.set or self.set_inner here, as
178+
# Database.setnode doesn't update the "activity" or "actor" properties.
179+
self.db.setnode(self.classname, nodeid, values={'content': fp.read()})
183180
fp.close()

0 commit comments

Comments
 (0)