From 6edd0e2f8d9672793a93450292c81a49e501f98e Mon Sep 17 00:00:00 2001 From: Francesco Siddi Date: Fri, 25 Aug 2017 10:35:49 +0200 Subject: [PATCH] Fix for embedded template paths When edting a custom node type we were building the wrong path, and not passing the project argument to the render_template function. --- pillar/web/nodes/routes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pillar/web/nodes/routes.py b/pillar/web/nodes/routes.py index 8c0ae303..2b997bbc 100644 --- a/pillar/web/nodes/routes.py +++ b/pillar/web/nodes/routes.py @@ -448,9 +448,8 @@ def edit(node_id): else: attach_project_pictures(project, api) - template = '{0}/edit{1}.html'.format(node_type['name'], embed_string) - # We should more simply check if the template file actually exsists on - # the filesystem level + template = 'nodes/custom/{0}/edit{1}.html'.format(node_type['name'], embed_string) + # We should more simply check if the template file actually exists on the filesystem try: return render_template( template, @@ -459,7 +458,8 @@ def edit(node_id): form=form, errors=form.errors, error=error, - api=api) + api=api, + project=project,) except TemplateNotFound: template = 'nodes/edit{1}.html'.format(node_type['name'], embed_string) is_embedded_edit = True if embed_string else False