mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-13 22:17:07 +00:00
Fix images in single logbook entries
This commit is contained in:
@@ -57,13 +57,16 @@ def parseCaveQMs(cave,inputFile):
|
||||
qmCSVContents.seek(0,0)
|
||||
qmReader = csv.reader(qmCSVContents,dialect=dialect)
|
||||
next(qmReader) # Skip header row
|
||||
n = 0
|
||||
for line in qmReader:
|
||||
try:
|
||||
n += 1
|
||||
year=int(line[0][1:5])
|
||||
logslug = f'PH_{int(year)}_{int(n):02d}'
|
||||
#check if placeholder exists for given year, create it if not
|
||||
message = " ! - "+ str(year) + " logbook: placeholder entry for '" + cave + "' created. Should be re-attached to the actual trip."
|
||||
if cave=='204-steinBH':
|
||||
placeholder, hadToCreate = LogbookEntry.objects.get_or_create(date__year=year, place="204", title="placeholder for QMs in 204", text=message, defaults={"date": date(year, 1, 1),"cave_slug":str(steinBr)})
|
||||
placeholder, hadToCreate = LogbookEntry.objects.get_or_create(date__year=year, place="204", title="placeholder for QMs in 204", text=message, defaults={"date": date(year, 1, 1),"cave_slug":str(steinBr), "slug": logslug})
|
||||
elif cave=='234-Hauch':
|
||||
placeholder, hadToCreate = LogbookEntry.objects.get_or_create(date__year=year, place="234", title="placeholder for QMs in 234", text=message, defaults={"date": date(year, 1, 1),"cave_slug":str(hauchHl)})
|
||||
# if hadToCreate:
|
||||
|
||||
Reference in New Issue
Block a user