Update migration code to use new search and write api.

Search returns record objects now and write expects a list of records.

issue3002
review662004
This commit is contained in:
Ian Wilson committed 2013-02-15 13:49:09 -08:00
1 parent 63a2b16aa9
commit 238750fe48
1 file changed
+2 -2
+2 -2
View File
@@ -105,9 +105,9 @@ class Translation(ModelSQL, ModelView):
while translations:
translations = cls.search([], offset=offset, limit=limit)
offset += limit
for translation in cls.browse(translations):
for translation in translations:
src_md5 = cls.get_src_md5(translation.src)
cls.write(translation.id, {
cls.write([translation], {
'src_md5': src_md5,
})
table = TableHandler(cursor, cls, module_name)