forked from expo/troggle
detect missing current expo on expo page
This commit is contained in:
@@ -91,7 +91,7 @@ def alphabet_suffix(n):
|
|||||||
|
|
||||||
def make_new_expo(year):
|
def make_new_expo(year):
|
||||||
coUniqueAttribs = {"year": 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)
|
e = Expedition.objects.create(**otherAttribs, **coUniqueAttribs)
|
||||||
u = User.objects.get(username='expo')
|
u = User.objects.get(username='expo')
|
||||||
u.current_year = year
|
u.current_year = year
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ def expedition(request, expeditionname):
|
|||||||
does lazy evaluation.
|
does lazy evaluation.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
current = current_expo() # creates new expo after 31st Dec.
|
||||||
try:
|
try:
|
||||||
expo = Expedition.objects.get(year=int(expeditionname))
|
expo = Expedition.objects.get(year=int(expeditionname))
|
||||||
except:
|
except:
|
||||||
|
|||||||
Reference in New Issue
Block a user