From 957f78b1a38bc5f852d7817c76792d4ac7e45a6b Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Tue, 23 Jul 2024 16:18:09 +0200 Subject: [PATCH] trying to debug dup lbe --- core/views/uploads.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/views/uploads.py b/core/views/uploads.py index 86b5f6c..6a45e08 100644 --- a/core/views/uploads.py +++ b/core/views/uploads.py @@ -335,6 +335,13 @@ def logbookedit(request, year=None, slug=None): else: authorflag = True print(f"! Unrecognised author: {author}") + + # if somehow we get a slug set to just '2024', not eg '2020-08-10b' + # This is a hack, why can we not reproduce this bug on the dev system? + if len(slug) < 7: + slug = "" + if prev_slug < 7: + prev_slug = "" if not prev_slug and not slug: # Creating a new logbook entry with all the gubbins