diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2021-04-30 00:24:36 +0100 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2021-04-30 00:24:36 +0100 |
commit | 03a5f5989e74ba50ff63ba599f98cd36dc0fa5d0 (patch) | |
tree | 84e8895c0caca3b55e65f12737a2c8d14435fed6 /core/models/troggle.py | |
parent | e5cf1b5289d908133bcfbc7054b0eda1e658dbfd (diff) | |
download | troggle-03a5f5989e74ba50ff63ba599f98cd36dc0fa5d0.tar.gz troggle-03a5f5989e74ba50ff63ba599f98cd36dc0fa5d0.tar.bz2 troggle-03a5f5989e74ba50ff63ba599f98cd36dc0fa5d0.zip |
chipping away bug in personexpedition, remove role
Diffstat (limited to 'core/models/troggle.py')
-rw-r--r-- | core/models/troggle.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/core/models/troggle.py b/core/models/troggle.py index 10c982c..f9558ff 100644 --- a/core/models/troggle.py +++ b/core/models/troggle.py @@ -184,12 +184,19 @@ class PersonExpedition(TroggleModel): nickname = models.CharField(max_length=100,blank=True, null=True) def GetPersonroles(self): + '''To do: excise the 'role' bit of this while retaining personrole + which is used in some later logic + + But apparently never used !? + + ''' res = [ ] for personrole in self.personrole_set.order_by('survexblock'): - if res and res[-1]['survexpath'] == personrole.survexblock.survexpath: - res[-1]['roles'] += ", " + str(personrole.role) - else: - res.append({'date':personrole.survexblock.date, 'survexpath':personrole.survexblock.survexpath, 'roles':str(personrole.role)}) + res.append({'date':personrole.survexblock.date, 'survexpath':personrole.survexblock.survexpath}) + # if res and res[-1]['survexpath'] == personrole.survexblock.survexpath: + # res[-1]['roles'] += ", " + str(personrole.role) + # else: + # res.append({'date':personrole.survexblock.date, 'survexpath':personrole.survexblock.survexpath, 'roles':str(personrole.role)}) return res class Meta: |