Don't know

This commit is contained in:
2016-06-07 16:52:22 +02:00
parent 62ec42297d
commit 7292957497
2 changed files with 7 additions and 3 deletions

View File

@@ -485,13 +485,17 @@ def logout(request):
def get_current_md(ls,season):
""" get current matchday """
"""
try:
current_md = Match.objects.filter(leagueShortcut=ls, season=season, \
finished=False).order_by('matchday').values_list('matchday', \
flat=True).distinct()[0]
except IndexError:
current_md = Match.objects.filter(leagueShortcut=ls, season=season).aggregate(Max('matchday'))
except:
current_md = 34
"""
current_md = 34
return(current_md)
def get_current_ls():