From a9ffae9b87b001ecd2f5fbc626d3c782548acf94 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Sun, 2 May 2021 14:50:46 +0100 Subject: Fix images in single logbook entries --- parsers/logbooks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'parsers/logbooks.py') diff --git a/parsers/logbooks.py b/parsers/logbooks.py index 8237bdc..3bb49b5 100644 --- a/parsers/logbooks.py +++ b/parsers/logbooks.py @@ -59,7 +59,7 @@ trips ={} # the logbook loading section # def set_trip_id(year, seq): - tid= f"{year}.s{seq:02d}" + tid= f"{year}_s{seq:02d}" return tid @@ -135,7 +135,7 @@ def EnterLogIntoDbase(date, place, title, text, trippeople, expedition, logtime_ # but it is a db query which we should try to avoid - rewrite this #NEW slug for a logbook entry here! Use the unique id, not the title !!! - slug = tid + "." + slugify(title)[:10] + slug = tid + "_" + slugify(title)[:10].replace('-','_') nonLookupAttribs={'place':place, 'text':text, 'expedition':expedition, 'cave_slug':str(cave), 'slug': slug, 'entry_type':entry_type} lbo, created=save_carefully(LogbookEntry, lookupAttribs, nonLookupAttribs) -- cgit v1.2.3