Private
Public Access
1
0

Merge branch 'release/v18.0.16'

This commit is contained in:
Sander Roosendaal
2023-04-10 14:15:08 +02:00
5 changed files with 25 additions and 18 deletions

View File

@@ -145,7 +145,12 @@ def workout_goldmedalstandard(workout, reset=False):
goldmedalstandard, goldmedalseconds = calculate_goldmedalstandard( goldmedalstandard, goldmedalseconds = calculate_goldmedalstandard(
workout.user, workout) workout.user, workout)
if workout.workouttype in otwtypes: if workout.workouttype in otwtypes:
factor = 100./(100.-workout.user.otwslack) try:
factor = 100./(100.-workout.user.otwslack)
except ZeroDivisionError:
factor = 1.
workout.user.otwslack = 0
workout.user.save()
goldmedalstandard = goldmedalstandard*factor goldmedalstandard = goldmedalstandard*factor
workout.goldmedalstandard = goldmedalstandard workout.goldmedalstandard = goldmedalstandard
workout.goldmedalseconds = goldmedalseconds workout.goldmedalseconds = goldmedalseconds

View File

@@ -187,15 +187,15 @@ class StravaIntegration(SyncIntegration):
except KeyError: except KeyError:
activity_type = 'Rowing' activity_type = 'Rowing'
_ = myqueue(queue, _ = myqueue(queue,
handle_strava_sync, handle_strava_sync,
self.rower.stravatoken, self.rower.stravatoken,
workout.id, workout.id,
tcxfile, workout.name, activity_type, tcxfile, workout.name, activity_type,
workout.notes) workout.notes)
dologging('strava_export_log.log', 'Exporting as {t} from {w}'.format( dologging('strava_export_log.log', 'Exporting as {t} from {w}'.format(
t=activity_type, w=workout.workouttype)) t=activity_type, w=workout.workouttype))
return 1 return 1

View File

@@ -5773,14 +5773,13 @@ def interactive_flex_chart2(id, r, promember=0,
except KeyError: except KeyError:
pass pass
if len(rowdata) < 2: try:
rowdata = dataprep.getsmallrowdata_db(columns, ids=[id], doclean=True, if len(rowdata) < 2:
workstrokesonly=False) rowdata = dataprep.getsmallrowdata_db(columns, ids=[id],
workstrokesonly = False doclean=False,
if len(rowdata) < 2: workstrokesonly=False)
rowdata = dataprep.getsmallrowdata_db(columns, ids=[id], workstrokesonly = False
doclean=False, except TypeError:
workstrokesonly=False)
workstrokesonly = False workstrokesonly = False
try: try:
_ = rowdata[yparam2] _ = rowdata[yparam2]

Binary file not shown.

View File

@@ -38,7 +38,10 @@ def get_weather_data(long, lat, unixtime):
return 0 return 0
if s.ok: if s.ok:
return s.json() try:
return s.json()
except:
return 0
else: # pragma: no cover else: # pragma: no cover
return 0 return 0