From a8c5954f9c48a2485f3d198a949268ba78f1b339 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Sat, 12 Aug 2023 10:16:20 +0200 Subject: Fix running with the default template --- planner/planner_generator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/planner/planner_generator.py b/planner/planner_generator.py index f2c6408..633d83a 100755 --- a/planner/planner_generator.py +++ b/planner/planner_generator.py @@ -57,13 +57,14 @@ class Generator: template or self.default_template ) + ".pdf" + if not template: + template = self.default_template + self.paper_size = self._get_paper_size(template) env = jinja2.Environment() self.templates_dir = "templates" loader = jinja2.FileSystemLoader(self.templates_dir) - if not template: - template = self.default_template self.template_recto = loader.load(env, template + "-r.svg") self.template_verso = loader.load(env, template + "-v.svg") self.template_cover = loader.load( -- cgit v1.2.3