Fix attachment rendering for nodes without description.

This commit is contained in:
Sybren A. Stüvel 2016-11-02 16:49:18 +01:00
parent 4ec3268a23
commit cc562a9fb1

View File

@ -260,7 +260,8 @@ def _view_handler_asset(node, template_path, template_action, link_allowed):
# Treat it as normal file (zip, blend, application, etc) # Treat it as normal file (zip, blend, application, etc)
asset_type = 'file' asset_type = 'file'
node['description'] = attachments.render_attachments(node, node['description']) if 'description' in node:
node['description'] = attachments.render_attachments(node, node['description'])
template_path = os.path.join(template_path, asset_type) template_path = os.path.join(template_path, asset_type)