From 3b9a2b990d869c4b5a30c6d92bb4b4f59a815168 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Fri, 4 Aug 2023 10:29:20 +0300 Subject: [PATCH] bugfix --- core/views/caves.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/views/caves.py b/core/views/caves.py index 4a148a1..ee054d0 100644 --- a/core/views/caves.py +++ b/core/views/caves.py @@ -490,6 +490,7 @@ def edit_entrance(request, path="", caveslug=None, entslug=None): return HttpResponseRedirect("/" + cave.url) else: # GET the page, not POST, or if either of the forms were invalid when POSTed + entletterform = None print(f"ENTRANCE in db: entranceletter = '{caveAndEntrance.entranceletter}'") if entrance: # re-read entrance data from file. @@ -506,7 +507,7 @@ def edit_entrance(request, path="", caveslug=None, entslug=None): if entletter == "": entletterform = EntranceLetterForm() print(f" Blank value: getting entletter from EntranceLetterForm") - print(f"{entletter=} {entletterform=}") + print(f"{entletter=} ") else: entform = EntranceForm() entletterform = EntranceLetterForm() @@ -518,7 +519,7 @@ def edit_entrance(request, path="", caveslug=None, entslug=None): "entform": form, "cave": cave, "entletter": entletter, - "entletterform": entletterform, + "entletterform": entletterform, # is unset if not being used "entlettereditable": entlettereditable, "path": path + "/", },