From 226cbb6b5cb9d38b2856a3007745c8045ed9efae Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Sun, 29 Jan 2023 20:59:56 +0000 Subject: Fixed coloured T and S on expo calendar --- parsers/survex.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'parsers/survex.py') diff --git a/parsers/survex.py b/parsers/survex.py index cce3905..634aeca 100644 --- a/parsers/survex.py +++ b/parsers/survex.py @@ -113,8 +113,10 @@ def put_person_on_trip(survexblock, personexpedition, tm): try: personrole = SurvexPersonRole.objects.create( - survexblock=survexblock, person = personexpedition.person, - expeditionday = survexblock.expeditionday, personexpedition=personexpedition, + survexblock=survexblock, + person = personexpedition.person, + # expeditionday = survexblock.expeditionday, + personexpedition=personexpedition, personname=tm ) except: @@ -353,14 +355,6 @@ class LoadingSurvex: expo = survexblock.expedition # may be None if no *date yet if expo: - if not survexblock.expeditionday: # *date has been set - # should not happen - message = f"! *team {expo.year} expo ok, expedition day NOT in *team {survexblock.survexfile.path} ({survexblock}) " - print(self.insp + message) - stash_data_issue( - parser="survex", message=message, url=None, sb=(survexblock.survexfile.path) - ) - personexpedition = GetPersonExpeditionNameLookup(expo).get(tm.lower()) if personexpedition: put_person_on_trip(survexblock, personexpedition, tm) @@ -501,7 +495,7 @@ class LoadingSurvex: expo = self.get_expo_from_year(year) survexblock.expedition = expo - survexblock.expeditionday = expo.get_expedition_day(survexblock.date) + # survexblock.expeditionday = expo.get_expedition_day(survexblock.date) survexblock.save() team = get_team_on_trip(survexblock) # should be empty, should only be in 'pending' @@ -1705,7 +1699,7 @@ class LoadingSurvex: stash_data_issue(parser="survex", message=message, url=None, sb=(path)) return # skip this survex file and all things *included in it except: - message = f" ! ERROR *include file '{path}' in '{survexblock}' has unexpected error. Omitted." + message = f" ! ERROR *include file '{path}' in '{survexblock}' has unexpected error. OMITTED!" print(message) print(message, file=sys.stderr) stash_data_issue(parser="survex", message=message, url=None, sb=(path)) -- cgit v1.2.3