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

python3 fixes for djsngo admin pages

This commit is contained in:
Philip Sargent
2020-05-31 22:35:36 +01:00
parent c863bf6e1d
commit f949bb8dc0
3 changed files with 5 additions and 4 deletions

View File

@@ -157,7 +157,7 @@ class Person(TroggleModel):
notability = Decimal(0)
max_expo_val = 0
max_expo_year = Expedition.objects.all().aggregate(Max('year'))
max_expo_year = Expedition.objects.all().aggregate(models.Max('year'))
max_expo_val = int(max_expo_year['year__max']) + 1
for personexpedition in self.personexpedition_set.all():
@@ -232,7 +232,7 @@ class PersonExpedition(TroggleModel):
return res["day_min"]
def day_max(self):
res = self.persontrip_set.all().aggregate(day_max=Max("expeditionday__date"))
res = self.persontrip_set.all().aggregate(day_max=models.Max("expeditionday__date"))
return res["day_max"]