Commit ef1f3a89 authored by Rafael Monnerat's avatar Rafael Monnerat

Download using original filename

When the tool reads bt5list, it contains the filename or directory name.
Preserve it when generate the list of business template to support nicely
both cases.
parent 31688f6e
...@@ -1134,6 +1134,7 @@ class TemplateTool (BaseTool): ...@@ -1134,6 +1134,7 @@ class TemplateTool (BaseTool):
for repository, property_dict in template_item_list: for repository, property_dict in template_item_list:
property_dict = property_dict.copy() property_dict = property_dict.copy()
id = property_dict['id'] id = property_dict['id']
filename = property_dict['id']
del property_dict['id'] del property_dict['id']
version = property_dict['version'] version = property_dict['version']
version_state = 'new' version_state = 'new'
...@@ -1155,6 +1156,7 @@ class TemplateTool (BaseTool): ...@@ -1155,6 +1156,7 @@ class TemplateTool (BaseTool):
obj = newTempBusinessTemplate(self, 'temp_' + uid, obj = newTempBusinessTemplate(self, 'temp_' + uid,
version_state = version_state, version_state = version_state,
version_state_title = version_state_title, version_state_title = version_state_title,
filename = filename,
installed_version = installed_version, installed_version = installed_version,
installed_revision = installed_revision, installed_revision = installed_revision,
repository = repository, **property_dict) repository = repository, **property_dict)
...@@ -1225,7 +1227,7 @@ class TemplateTool (BaseTool): ...@@ -1225,7 +1227,7 @@ class TemplateTool (BaseTool):
if name.endswith('.bt5'): if name.endswith('.bt5'):
name = name[:-4] name = name[:-4]
business_template_url_dict[name] = { business_template_url_dict[name] = {
'url': '%s/%s' % (url, name), 'url': '%s/%s' % (url, bt.filename),
'revision': bt.getRevision() 'revision': bt.getRevision()
} }
return business_template_url_dict return business_template_url_dict
......
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