fix
This commit is contained in:
@@ -100,8 +100,22 @@ def alert_get_stats(alert, nperiod=0): # pragma: no cover
|
||||
boattype=alert.boattype)
|
||||
ids = [w.id for w in workouts]
|
||||
|
||||
df = getsmallrowdata_db(columns, ids=ids, doclean=True,
|
||||
workstrokesonly=workstrokesonly)
|
||||
try:
|
||||
df = getsmallrowdata_db(columns, ids=ids, doclean=True,
|
||||
workstrokesonly=workstrokesonly)
|
||||
except:
|
||||
return {
|
||||
'workouts': workouts.count(),
|
||||
'startdate': startdate,
|
||||
'enddate': enddate,
|
||||
'nr_strokes': 0,
|
||||
'nr_strokes_qualifying': 0,
|
||||
'percentage': 0,
|
||||
'nperiod': nperiod,
|
||||
'median': 0,
|
||||
'median_q': 0,
|
||||
'standard_dev': 0,
|
||||
}
|
||||
|
||||
if df.empty:
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user