diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2021-05-02 14:50:46 +0100 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2021-05-02 14:50:46 +0100 |
commit | a9ffae9b87b001ecd2f5fbc626d3c782548acf94 (patch) | |
tree | e761e9210addda9a170579c25e9bf712b941d159 /parsers/logbooks.py | |
parent | 3393db0fbc69556ad09a18b840b6cf10eaf4f52c (diff) | |
download | troggle-a9ffae9b87b001ecd2f5fbc626d3c782548acf94.tar.gz troggle-a9ffae9b87b001ecd2f5fbc626d3c782548acf94.tar.bz2 troggle-a9ffae9b87b001ecd2f5fbc626d3c782548acf94.zip |
Fix images in single logbook entries
Diffstat (limited to 'parsers/logbooks.py')
-rw-r--r-- | parsers/logbooks.py | 4 |
1 files changed, 2 insertions, 2 deletions
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) |