2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-03-23 22:34:28 +00:00

SurvexPersonTeam renamed form survexpersonrole

This commit is contained in:
2026-02-01 14:56:31 +00:00
parent c899c0749c
commit fd2f920745
11 changed files with 37 additions and 37 deletions

View File

@@ -280,8 +280,8 @@ class SurvexBlock(models.Model):
return index
class SurvexPersonRole(models.Model):
"""The CASCADE means that if a SurvexBlock or a Person is deleted, then the SurvexPersonRole
class SurvexPersonTeam(models.Model):
"""The CASCADE means that if a SurvexBlock or a Person is deleted, then the SurvexPersonTeam
is deleted too
"""
survexblock = models.ForeignKey("SurvexBlock", on_delete=models.CASCADE, db_index=True)

View File

@@ -205,5 +205,5 @@ class PersonExpedition(TroggleModel):
def surveyedleglength(self):
"""Survey length for this person on all survex trips on this expedition"""
survexblocks = [personrole.survexblock for personrole in self.survexpersonrole_set.all()]
survexblocks = [personrole.survexblock for personrole in self.survexpersonteam_set.all()]
return sum([survexblock.legslength for survexblock in set(survexblocks)])