2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-13 20:27:05 +00:00

Fix images in single logbook entries

This commit is contained in:
Philip Sargent
2021-05-02 14:50:46 +01:00
parent 3393db0fbc
commit a9ffae9b87
3 changed files with 14 additions and 3 deletions

View File

@@ -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)