getting all tests to pass, improved developers page
This commit is contained in:
@@ -363,7 +363,10 @@ def trendflexdata(workouts, options, userid=0):
|
||||
|
||||
savedata = options.get('savedata',False)
|
||||
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
try:
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
except AttributeError: # pragma: no cover
|
||||
workouts = [w for w in workouts if w.workoutsource != 'strava']
|
||||
|
||||
fieldlist, fielddict = dataprep.getstatsfields()
|
||||
fieldlist = [xparam, yparam, groupby,
|
||||
@@ -567,7 +570,10 @@ def flexalldata(workouts, options):
|
||||
trendline = options['trendline']
|
||||
promember = True
|
||||
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
try:
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
except AttributeError: # pragma: no cover
|
||||
workouts = [w for w in workouts if w.workoutsource != 'strava']
|
||||
|
||||
workstrokesonly = not includereststrokes
|
||||
|
||||
@@ -615,7 +621,10 @@ def histodata(workouts, options):
|
||||
workmax = options['workmax']
|
||||
userid = options['userid']
|
||||
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
try:
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
except AttributeError: # pragma: no cover
|
||||
workouts = [w for w in workouts if w.workoutsource != 'strava']
|
||||
|
||||
|
||||
if userid == 0: # pragma: no cover
|
||||
@@ -805,7 +814,10 @@ def cpdata(workouts, options):
|
||||
|
||||
|
||||
def statsdata(workouts, options):
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
try:
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
except AttributeError: # pragma: no cover
|
||||
workouts = [w for w in workouts if w.workoutsource != 'strava']
|
||||
|
||||
includereststrokes = options['includereststrokes']
|
||||
ids = options['ids']
|
||||
@@ -881,7 +893,11 @@ def statsdata(workouts, options):
|
||||
|
||||
|
||||
def comparisondata(workouts, options):
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
try:
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
except AttributeError: # pragma: no cover
|
||||
workouts = [w for w in workouts if w.workoutsource != 'strava']
|
||||
|
||||
includereststrokes = options['includereststrokes']
|
||||
xparam = options['xaxis']
|
||||
yparam1 = options['yaxis1']
|
||||
@@ -925,7 +941,10 @@ def comparisondata(workouts, options):
|
||||
|
||||
|
||||
def boxplotdata(workouts, options):
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
try:
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
except AttributeError:
|
||||
workouts = [w for w in workouts if w.workoutsource != 'strava']
|
||||
|
||||
includereststrokes = options['includereststrokes']
|
||||
spmmin = options['spmmin']
|
||||
|
||||
Reference in New Issue
Block a user