Commit edeefc12 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Perform migration of bt-specific Property Sheets from filesystem to

ZODB (code previously commented by r42901 but at that time the
migration was not performed because of _perform_migration being set to
False and then enabled in r42902)



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42922 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7fc77368
......@@ -3681,23 +3681,23 @@ class PropertySheetTemplateItem(DocumentTemplateItem,
if not self._perform_migration:
return DocumentTemplateItem.install(self, context, **kw)
# # With format 0 of Business Template, the objects are stored in
# # '_archive' whereas they are stored in '_objects' with format
# # version 1
# bt_format_version = context.getTemplateFormatVersion()
#
# if bt_format_version == 0 and \
# not self._is_already_migrated(self._archive.keys()):
# self._migrateAllFilesystemPropertySheets(context,
# self._archive,
# self._objects,
# kw.get('object_to_update'))
# elif bt_format_version == 1 and \
# not self._is_already_migrated(self._objects.keys()):
# self._migrateAllFilesystemPropertySheets(context,
# self._objects,
# self._archive,
# kw.get('object_to_update'))
# With format 0 of Business Template, the objects are stored in
# '_archive' whereas they are stored in '_objects' with format
# version 1
bt_format_version = context.getTemplateFormatVersion()
if bt_format_version == 0 and \
not self._is_already_migrated(self._archive.keys()):
self._migrateAllFilesystemPropertySheets(context,
self._archive,
self._objects,
kw.get('object_to_update'))
elif bt_format_version == 1 and \
not self._is_already_migrated(self._objects.keys()):
self._migrateAllFilesystemPropertySheets(context,
self._objects,
self._archive,
kw.get('object_to_update'))
return ObjectTemplateItem.install(self, context, **kw)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment