fixing errors
This commit is contained in:
@@ -5,6 +5,7 @@ from jinja2 import Environment, FileSystemLoader
|
||||
from rowers.rower_rules import can_view_session
|
||||
|
||||
from django.forms.widgets import SelectDateWidget, HiddenInput
|
||||
from polars.exceptions import ComputeError
|
||||
|
||||
def floatformat(x, prec=2): # pragma: no cover
|
||||
return '{x}'.format(x=round(x, prec))
|
||||
@@ -945,8 +946,10 @@ def boxplotdata(workouts, options):
|
||||
except ColumnNotFoundError:
|
||||
pass
|
||||
|
||||
|
||||
datadf = datadf.with_columns((pl.col("workoutid").apply(lambda x: datemapping[x])).alias("date"))
|
||||
try:
|
||||
datadf = datadf.with_columns((pl.col("workoutid").apply(lambda x: datemapping[x])).alias("date"))
|
||||
except ComputeError:
|
||||
return ("","No Valid Data")
|
||||
|
||||
if userid == 0: # pragma: no cover
|
||||
extratitle = ''
|
||||
|
||||
Reference in New Issue
Block a user