adding more data filtering exception catching
This commit is contained in:
@@ -2482,11 +2482,18 @@ def history_view_data(request, userid=0):
|
||||
meters, hours, minutes, seconds = get_totals(a_workouts)
|
||||
totalseconds = 3600 * hours + 60 * minutes + seconds
|
||||
ddf = getsmallrowdata_pl(columns, ids=[w.id for w in a_workouts])
|
||||
if ddf.is_empty():
|
||||
totalscript = ""
|
||||
totaldiv = "No data"
|
||||
|
||||
try:
|
||||
ddf = ddf.with_columns(pl.col("time").diff().clip(lower_bound=0).alias("deltat"))
|
||||
except KeyError:
|
||||
pass
|
||||
except ColumnNotFoundError:
|
||||
totalscript = ""
|
||||
totaldiv = "No data"
|
||||
|
||||
|
||||
ddf = dataprep.clean_df_stats_pl(ddf, workstrokesonly=True,
|
||||
ignoreadvanced=True)
|
||||
|
||||
Reference in New Issue
Block a user