From 220e1327d743b3b3c65b2d37aebdc063ca3c18a3 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Tue, 5 Sep 2023 15:49:12 +0300 Subject: validate author of trip on editing --- parsers/logbooks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'parsers/logbooks.py') diff --git a/parsers/logbooks.py b/parsers/logbooks.py index ddc65f7..8737508 100644 --- a/parsers/logbooks.py +++ b/parsers/logbooks.py @@ -166,7 +166,8 @@ def GetTripPersons(trippeople, expedition, logtime_underground, tid=None): message = f" ! - {expedition.year} No name match for: '{nickname_used}' in entry {tid=} for this year." print(message) DataIssue.objects.create(parser="logbooks", message=message) - res.append((personyear, nickname_used, logtime_underground)) + else: + res.append((personyear, nickname_used, logtime_underground)) except: # This should not happen. We do not raise exceptions in that function message = f" ! - {expedition.year} EXCEPTION: '{tripperson}' ({nickname_used}) in entry {tid=} for this year." @@ -259,6 +260,8 @@ def store_entry_into_database(date, place, tripcave, title, text, trippersons, a faster ? """ other_people = ", ".join(guests) # join list members separated by comma + if guests: + print(f" {date} - {guests}") nonLookupAttribs = { "place": place, -- cgit v1.2.3