From 13f3057185bc76056a55beedf3a200a8f231e563 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Tue, 27 Apr 2021 14:51:04 +0100 Subject: [PATCH] bugfixes --- core/models/caves.py | 3 ++- parsers/caves.py | 2 +- urls.py | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/models/caves.py b/core/models/caves.py index a990650..1a2d948 100644 --- a/core/models/caves.py +++ b/core/models/caves.py @@ -171,7 +171,8 @@ class Cave(TroggleModel): rs = [] res = "" for e in CaveAndEntrance.objects.filter(cave=self): - rs.append(e.entrance_letter) + if e.entrance_letter: + rs.append(e.entrance_letter) rs.sort() prevR = '' n = 0 diff --git a/parsers/caves.py b/parsers/caves.py index c969acd..50086ea 100644 --- a/parsers/caves.py +++ b/parsers/caves.py @@ -90,7 +90,7 @@ def do_pending_cave(k, url, area_1623): default_note += f"

\n\n - " default_note += f"When you Submit it will create a file file in expoweb/cave_data/ " default_note += f"

\n\n - Now you can edit the entrance info: click on Edit below for the dummy entrance. " - default_note += f"and then Submit to save it. NB your entrance info will not be visible after a reboot of the server until a programmer has edited parser/caves.py (python code) to remove the cave form the [pending] list. But it won't be lost." + default_note += f"and then Submit to save it (if you forget to do this, a dummy entrance will be created for your new cave description)." slug = "1623-" + k diff --git a/urls.py b/urls.py index 227f66d..75b4245 100644 --- a/urls.py +++ b/urls.py @@ -113,7 +113,6 @@ trogglepatterns = [ re_path(r'^cave/entrance/([^/]+)/?$', caves.caveEntrance), re_path(r'^cave/description/([^/]+)/?$', caves.caveDescription), - re_path(r'^cave/logbook/([^/]+)/?$', caves.caveLogbook), re_path(r'^(?P\d\d\d\d)(?P.*)$', cavepage, name="cavepage"), # shorthand /1623/264 BUT url links may break # Note that urls eg '1623/161/l/rl89a.htm' are handled by cavepage which redirects them to 'expopage'