Commit b842131c authored by Łukasz Nowak's avatar Łukasz Nowak

- react on keys passed with or without virtual path

As virtual paths are generated on the fly (to avoid BT data migration and
putting inside unreal information) this code has to cope with two types of keys.
One key without added virtual path during first Business Template installation
(as calling code uses install logic) and second, while user has chosen objects
to modify (as calling code uses upgrade logic).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45531 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c6d46df6
...@@ -3428,9 +3428,14 @@ class DocumentTemplateItem(BaseTemplateItem): ...@@ -3428,9 +3428,14 @@ class DocumentTemplateItem(BaseTemplateItem):
if context.getTemplateFormatVersion() == 1: if context.getTemplateFormatVersion() == 1:
need_reset = isinstance(self, DocumentTemplateItem) need_reset = isinstance(self, DocumentTemplateItem)
for key in self._objects.keys(): for key in self._objects.keys():
if update_dict.has_key(key) or force: # to achieve non data migration fresh installation parameters
# differ from upgrade parameteres, so here the check have to be
# care of both cases
upgraded_key = self._getKey(key)
if update_dict.has_key(key) or update_dict.has_key(upgraded_key) \
or force:
if not force: if not force:
action = update_dict[key] action = update_dict.get(key, update_dict.get(upgraded_key))
if action == 'nothing': if action == 'nothing':
continue continue
text = self._objects[key] text = self._objects[key]
......
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