2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-14 19:47:12 +00:00

chipping away bug in personexpedition, remove role

This commit is contained in:
Philip Sargent
2021-04-30 00:24:36 +01:00
parent e5cf1b5289
commit 03a5f5989e
9 changed files with 82 additions and 34 deletions

View File

@@ -26,6 +26,11 @@ It does also NOT scan the Loser repo for all the svx files - though it should !
todo = '''Also walk the entire tree in the :loser: repo looking for unconnected survex files
- add them to the system so that they can be reported-on
- produce a parser report and create a troggle report page (some are OK, e.g. futility series replaced by ARGE survey in 115)
- If you look at e.g. http://expo.survex.com/survexfile/161#T_caves-1623/161/lhr/alllhr
you will see than have the team members are recognised by this parser, but not recognised by the
wider troggle system (the name is not a hyperlink) - apparently randomly.
GetPersonExpeditionNameLookup() needs to be fixed.
'''
survexblockroot = None
ROOTBLOCK = "rootblock"
@@ -201,7 +206,8 @@ class LoadingSurvex():
personexpedition = survexblock.expedition and GetPersonExpeditionNameLookup(survexblock.expedition).get(tm.lower())
if (personexpedition, tm) not in teammembers:
teammembers.append((personexpedition, tm))
personrole = SurvexPersonRole(survexblock=survexblock, nrole=mteammember.group(1).lower(), personexpedition=personexpedition, personname=tm)
personrole = SurvexPersonRole(survexblock=survexblock, personexpedition=personexpedition, personname=tm)
# personrole = SurvexPersonRole(survexblock=survexblock, nrole=mteammember.group(1).lower(), personexpedition=personexpedition, personname=tm)
personrole.save()
personrole.expeditionday = survexblock.expeditionday
if personexpedition: