Mercurial > p > roundup > code
changeset 3086:d4d77d992876
Use Database.setnode instead of self.set or self.set_inner here...
...as Database.setnode doesn't update the "activity" or "actor" properties.
| author | Johannes Gijsbers <jlgijsbers@users.sourceforge.net> |
|---|---|
| date | Thu, 06 Jan 2005 22:07:35 +0000 |
| parents | b286373a517f |
| children | 6da931530497 |
| files | roundup/backends/back_tsearch2.py |
| diffstat | 1 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/backends/back_tsearch2.py Thu Jan 06 17:57:05 2005 +0000 +++ b/roundup/backends/back_tsearch2.py Thu Jan 06 22:07:35 2005 +0000 @@ -170,14 +170,11 @@ fp.write(self.get(nodeid, "content", default='')) fp.close() - # XXX: this unfortunately sets the activity on the node to "now", causing - # testImportExport to fail. We either need to create a way to disable - # setting activity/actor or we need to override import_list so it already - # includes the "content" property. However, that would mean changing its - # call signature, as we need to know `dirname`. def import_files(self, dirname, nodeid): source = self.exportFilename(dirname, nodeid) fp = open(source, "r") - self.set(nodeid, content=fp.read()) + # Use Database.setnode instead of self.set or self.set_inner here, as + # Database.setnode doesn't update the "activity" or "actor" properties. + self.db.setnode(self.classname, nodeid, values={'content': fp.read()}) fp.close()
