2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-16 22:07:03 +00:00

Fixed coloured T and S on expo calendar

This commit is contained in:
2023-01-29 20:59:56 +00:00
parent a1c34f488d
commit 226cbb6b5c
10 changed files with 81 additions and 36 deletions

View File

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