From 0706d5dc77ac3dd52ced544f9dcd6ac01342d7c6 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Wed, 26 Jul 2023 16:54:37 +0300 Subject: [PATCH] fix entrqnce edit bug --- core/views/caves.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/views/caves.py b/core/views/caves.py index 5b34551..cb4496e 100644 --- a/core/views/caves.py +++ b/core/views/caves.py @@ -477,10 +477,16 @@ def edit_entrance(request, path="", caveslug=None, entslug=None): entrance.slug = slugname entrance.cached_primary_slug = slugname entrance.filename = slugname + ".html" + else: + entrance.slug = entslug + entrance.cached_primary_slug = entslug + entrance.filename = entslug + ".html" entrance.save() entrance_letter.entrance = entrance entrance_letter.save() + if not entrance.filename: + print(f"! BARF - why no filename set? '{entslug}' letter:{entletter.cleaned_data['entrance_letter']}") entrance_file = entrance.file_output() print(f"Online edit of entrance {entrance.slug}") cave_file = cave.file_output()