From e30be63577c7c53880d52f894d8d6a12bb178ccd Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Sun, 27 Nov 2022 10:57:03 +0100 Subject: [PATCH] small fix --- rowers/dataroutines.py | 19 +++++++++++-------- rowers/templates/list_workouts.html | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/rowers/dataroutines.py b/rowers/dataroutines.py index 88bc7cb5..31129951 100644 --- a/rowers/dataroutines.py +++ b/rowers/dataroutines.py @@ -1288,14 +1288,17 @@ def getsmallrowdata_db(columns, ids=[], doclean=True, workstrokesonly=True, comp else: df = pd.DataFrame() - if compute and len(df): - data = df.copy() - if doclean: - data = clean_df_stats(data, ignorehr=True, - workstrokesonly=workstrokesonly) - data.dropna(axis=1, how='all', inplace=True) - data.dropna(axis=0, how='any', inplace=True) - return data + try: + if compute and len(df): + data = df.copy() + if doclean: + data = clean_df_stats(data, ignorehr=True, + workstrokesonly=workstrokesonly) + data.dropna(axis=1, how='all', inplace=True) + data.dropna(axis=0, how='any', inplace=True) + return data + except TypeError: + pass return df diff --git a/rowers/templates/list_workouts.html b/rowers/templates/list_workouts.html index ec2f3f32..8703bb6d 100644 --- a/rowers/templates/list_workouts.html +++ b/rowers/templates/list_workouts.html @@ -92,7 +92,7 @@ {% if workout.rankingpiece %} {% endif %} - {% if workout.rpe == 0 %} + {% if workout.rpe == 0 and not workout.duplicate %} No RPE