Commit c1746228 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Get rid of Business Template format version 0 as it's been deprecated for a while.

parent 394054e6
No related merge requests found
This diff is collapsed.
......@@ -307,12 +307,7 @@ class TemplateTool (BaseTool):
file.seek(0)
magic = file.read(5)
if magic == '<?xml': # old version
self._importObjectFromFile(path, id=id)
bt = self[id]
bt.id = id # Make sure id is consistent
bt.setProperty('template_format_version', 0, type='int')
else: # new version
if 1:
# XXX: should really check for a magic and offer a falback if it
# doens't correspond to anything handled.
tar = tarfile.open(path, 'r:gz')
......
......@@ -68,16 +68,12 @@ if len(uids) > 2:\n
bt1 = context.portal_catalog.getObject(uids[0])\n
if bt1.getBuildingState() != \'built\':\n
raise TemplateConditionError(\'Business Template must be built to make diff\')\n
if (getattr(bt1, \'template_format_version\', 0)) != 1:\n
raise TemplateConditionError(\'Business Template must be in new format\')\n
\n
# check if there is a second bt or if we compare to installed one\n
if len(uids) == 2:\n
bt2 = context.portal_catalog.getObject(uids[1])\n
if bt2.getBuildingState() != \'built\':\n
raise TemplateConditionError(\'Business Template must be built to make diff\')\n
if (getattr(bt2, \'template_format_version\', 0)) != 1:\n
raise TemplateConditionError(\'Business Template must be in new format\')\n
else:\n
# compare to objects in ZODB\n
bt2 = bt1\n
......
2013-12-12 arnaud.fontaine
* Get rid of Business Template format version 0 as it's been deprecated for a while.
2013-11-07 arnaud.fontaine
* SelectionTool: Changing storage or memcached settings were not taken into effect until restart.
......
41144
\ No newline at end of file
41145
\ No newline at end of file
......@@ -49,7 +49,7 @@
</item>
<item>
<key> <string>property_default</string> </key>
<value> <string>python: 0</string> </value>
<value> <string>python: 1</string> </value>
</item>
</dictionary>
</pickle>
......
2013-12-12 arnaud.fontaine
* Get rid of Business Template format version 0 as it's been deprecated for a while.
2013-10-17 tatuya
* Arrow: Add {source,destination}_{decision,carrier,section}_administration categories
......
69
\ No newline at end of file
70
\ No newline at end of file
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