diff options
Diffstat (limited to 'parsers/logbooks.py')
-rw-r--r-- | parsers/logbooks.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/parsers/logbooks.py b/parsers/logbooks.py index 467ff92..11159ad 100644 --- a/parsers/logbooks.py +++ b/parsers/logbooks.py @@ -10,7 +10,7 @@ from django.conf import settings from django.template.defaultfilters import slugify from django.utils.timezone import get_current_timezone, make_aware -from troggle.core.models import DataIssue, Expedition +from troggle.core.models import DataIssue, Expedition, TROG from troggle.core.models_caves import Cave, LogbookEntry, PersonTrip, GetCaveLookup from parsers.people import GetPersonExpeditionNameLookup from utils import save_carefully @@ -86,7 +86,6 @@ def EnterLogIntoDbase(date, place, title, text, trippeople, expedition, logtime_ """ saves a logbook entry and related persontrips Does NOT save the expeditionday_id - all NULLs. why? """ - trippersons, author = GetTripPersons(trippeople, expedition, logtime_underground) if not author: print(" ! - Skipping logentry: " + title + " - no author for entry") @@ -417,7 +416,7 @@ def SetDatesFromLogbookEntries(expedition): persontrip.save() # also saved in EnterLogIntoDbase. MERGE these to speed up import. -def LoadLogbookForExpedition(expedition,expect): +def LoadLogbookForExpedition(expedition, expect): """ Parses all logbook entries for one expedition If a cache is found it uses it. If not found, or fails sanity checks, parses source file. """ @@ -544,6 +543,7 @@ def LoadLogbooks(): expd ={} with open("loadlogbk.log", "a") as log: for expo in expos: + TROG['pagecache']['expedition'][expo.year] = None # clear cache if expo.year not in nologbook: print((" - Logbook for: " + expo.year)) numentries = LoadLogbookForExpedition(expo, entries[expo.year]) |