mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-02-08 13:03:46 +00:00
fixed bug from people who did not turn up, optimised parsing a bit
This commit is contained in:
@@ -144,10 +144,16 @@ class Person(TroggleModel):
|
||||
return sum([personexpedition.surveyedleglength() for personexpedition in self.personexpedition_set.all()])
|
||||
|
||||
def first(self):
|
||||
return self.personexpedition_set.order_by("-expedition")[0]
|
||||
if self.personexpedition_set.order_by("-expedition"):
|
||||
return self.personexpedition_set.order_by("-expedition")[0]
|
||||
else:
|
||||
return None
|
||||
|
||||
def last(self):
|
||||
return self.personexpedition_set.order_by("expedition")[0]
|
||||
if self.personexpedition_set.order_by("expedition"):
|
||||
return self.personexpedition_set.order_by("expedition")[0]
|
||||
else:
|
||||
return None
|
||||
|
||||
# moved from personexpedition
|
||||
def name(self):
|
||||
|
||||
Reference in New Issue
Block a user