excluded duplicate workouts from work load calc
This commit is contained in:
@@ -192,7 +192,7 @@ def get_execution_report(rower,startdate,enddate,plan=None):
|
|||||||
unmatchedworkouts = Workout.objects.filter(
|
unmatchedworkouts = Workout.objects.filter(
|
||||||
user=rower,
|
user=rower,
|
||||||
plannedsession=None,
|
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:
|
for w in unmatchedworkouts:
|
||||||
if w.rscore != 0:
|
if w.rscore != 0:
|
||||||
actualscore += w.rscore
|
actualscore += w.rscore
|
||||||
|
|||||||
@@ -441,7 +441,7 @@ def handle_stravaexport(f2,workoutname,stravatoken,description='',
|
|||||||
client = stravalib.Client(access_token=stravatoken)
|
client = stravalib.Client(access_token=stravatoken)
|
||||||
|
|
||||||
act = client.upload_activity(f2,'tcx.gz',name=workoutname)
|
act = client.upload_activity(f2,'tcx.gz',name=workoutname)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
res = act.wait(poll_interval=5.0,timeout=30)
|
res = act.wait(poll_interval=5.0,timeout=30)
|
||||||
message = 'Workout successfully synchronized to Strava'
|
message = 'Workout successfully synchronized to Strava'
|
||||||
|
|||||||
Reference in New Issue
Block a user