From 4bc202b0de1ae4ce07a48b1e743837e0d311dd28 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Thu, 3 May 2018 11:08:17 +0200 Subject: [PATCH 1/3] doing summary if speedcoach summary == 0 --- rowers/dataprep.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rowers/dataprep.py b/rowers/dataprep.py index 1a7cb73c..99fafaaf 100644 --- a/rowers/dataprep.py +++ b/rowers/dataprep.py @@ -1319,8 +1319,8 @@ def new_workout_from_file(r, f2, return (0, message, '') dosummary = (fileformat != 'fit' and 'speedcoach2' not in fileformat) + dosummary = dosummary or summary == '' - id, message = save_workout_database( f2, r, workouttype=workouttype, From 4e7a2316fac07b73e1c35d0cb6278f188e0df277 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Thu, 3 May 2018 12:20:57 +0200 Subject: [PATCH 2/3] mailprocessing summary --- rowers/mailprocessing.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rowers/mailprocessing.py b/rowers/mailprocessing.py index e01be4c5..7cca55f7 100644 --- a/rowers/mailprocessing.py +++ b/rowers/mailprocessing.py @@ -149,6 +149,7 @@ def make_new_workout_from_email(rower, datafile, name, cntr=0,testing=False): row.write_csv(datafilename, gzip=True) dosummary = (fileformat != 'fit' and 'speedcoach2' not in fileformat) + dosummary = dosummary or summary == '' if name == '': name = 'Workout from Background Queue' From da5d407a855d49f95ddb1eeccc930c97201cb724 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Fri, 4 May 2018 11:18:33 +0200 Subject: [PATCH 3/3] fix bug zipfile no summary --- rowers/mailprocessing.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rowers/mailprocessing.py b/rowers/mailprocessing.py index 7cca55f7..f27ca372 100644 --- a/rowers/mailprocessing.py +++ b/rowers/mailprocessing.py @@ -118,6 +118,7 @@ def make_new_workout_from_email(rower, datafile, name, cntr=0,testing=False): return 0 summary = '' + # handle non-Painsled if fileformat != 'csv': @@ -147,10 +148,11 @@ def make_new_workout_from_email(rower, datafile, name, cntr=0,testing=False): except KeyError: pass + row.write_csv(datafilename, gzip=True) dosummary = (fileformat != 'fit' and 'speedcoach2' not in fileformat) dosummary = dosummary or summary == '' - + if name == '': name = 'Workout from Background Queue' @@ -158,6 +160,7 @@ def make_new_workout_from_email(rower, datafile, name, cntr=0,testing=False): datafilename, rower, workouttype=workouttype, dosummary=dosummary, + summary=summary, inboard=inboard, oarlength=oarlength, title=name,