2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-21 23:01:52 +00:00

detect missing current expo on expo page

This commit is contained in:
Philip Sargent 2024-03-15 12:49:01 +00:00
parent dbfe72071e
commit e2d7ab4416
2 changed files with 2 additions and 1 deletions

View File

@ -91,7 +91,7 @@ def alphabet_suffix(n):
def make_new_expo(year):
coUniqueAttribs = {"year": year}
otherAttribs = {"name": f"CUCC expo {year}"}
otherAttribs = {"name": f"CUCC expo {year}", "logbookfile": "logbook.html"}
e = Expedition.objects.create(**otherAttribs, **coUniqueAttribs)
u = User.objects.get(username='expo')
u.current_year = year

View File

@ -66,6 +66,7 @@ def expedition(request, expeditionname):
does lazy evaluation.
"""
current = current_expo() # creates new expo after 31st Dec.
try:
expo = Expedition.objects.get(year=int(expeditionname))
except: