Private
Public Access
1
0

excluded duplicate workouts from work load calc

This commit is contained in:
Sander Roosendaal
2019-10-06 09:03:37 +02:00
parent 48906faaff
commit ddc17455bb
2 changed files with 2 additions and 2 deletions

View File

@@ -192,7 +192,7 @@ def get_execution_report(rower,startdate,enddate,plan=None):
unmatchedworkouts = Workout.objects.filter(
user=rower,
plannedsession=None,
date__gte=mm.startdate,date__lte=mm.enddate)
date__gte=mm.startdate,date__lte=mm.enddate).exclude(duplicate=True)
for w in unmatchedworkouts:
if w.rscore != 0:
actualscore += w.rscore

View File

@@ -441,7 +441,7 @@ def handle_stravaexport(f2,workoutname,stravatoken,description='',
client = stravalib.Client(access_token=stravatoken)
act = client.upload_activity(f2,'tcx.gz',name=workoutname)
try:
res = act.wait(poll_interval=5.0,timeout=30)
message = 'Workout successfully synchronized to Strava'