bug fixes
This commit is contained in:
@@ -256,19 +256,17 @@ def getfavorites(r,row):
|
||||
if 'speedcoach2' in row.workoutsource:
|
||||
workoutsource = 'speedcoach2'
|
||||
|
||||
try:
|
||||
favorites = FavoriteChart.objects.filter(user=r,
|
||||
workouttype__in=matchworkouttypes).order_by("id")
|
||||
favorites2 = FavoriteChart.objects.filter(user=r,
|
||||
workouttype__in=[workoutsource]).order_by("id")
|
||||
favorites = FavoriteChart.objects.filter(user=r,
|
||||
workouttype__in=matchworkouttypes).order_by("id")
|
||||
favorites2 = FavoriteChart.objects.filter(user=r,
|
||||
workouttype__in=[workoutsource]).order_by("id")
|
||||
|
||||
favorites = favorites | favorites2
|
||||
|
||||
|
||||
maxfav = len(favorites)-1
|
||||
except:
|
||||
favorites = None
|
||||
maxfav = 0
|
||||
|
||||
favorites = favorites | favorites2
|
||||
|
||||
maxfav = len(favorites)-1
|
||||
|
||||
|
||||
return favorites,maxfav
|
||||
|
||||
|
||||
Reference in New Issue
Block a user