diff --git a/pillar/web/nodes/routes.py b/pillar/web/nodes/routes.py index c5b2e65e..11ef6f6f 100644 --- a/pillar/web/nodes/routes.py +++ b/pillar/web/nodes/routes.py @@ -193,6 +193,9 @@ def view(node_id): for child in children: child.picture = get_file(child.picture, api=api) + if 'description' in node: + node['description'] = attachments.render_attachments(node, node['description']) + if request.args.get('format') == 'json': node = node.to_dict() node['url_edit'] = url_for('nodes.edit', node_id=node['_id']) @@ -265,9 +268,6 @@ def _view_handler_asset(node, template_path, template_action, link_allowed): # Treat it as normal file (zip, blend, application, etc) asset_type = 'file' - if 'description' in node: - node['description'] = attachments.render_attachments(node, node['description']) - template_path = os.path.join(template_path, asset_type) return template_path, template_action