summaryrefslogtreecommitdiff
path: root/planner
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2023-08-12 10:16:20 +0200
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2023-08-12 10:16:20 +0200
commita8c5954f9c48a2485f3d198a949268ba78f1b339 (patch)
tree2b3614ddfa052d167836c6755bf308721f2587bd /planner
parentbe7a56a864c5d460fbd89192dda56fac8737d17d (diff)
Fix running with the default template
Diffstat (limited to 'planner')
-rwxr-xr-xplanner/planner_generator.py5
1 files 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(