Private
Public Access
1
0

alert boat type

This commit is contained in:
Sander Roosendaal
2019-08-30 08:01:15 +02:00
parent a214f560d2
commit 2e892e7498
4 changed files with 11 additions and 3 deletions

View File

@@ -30,7 +30,8 @@ def create_alert(manager, rower, measured,period=7, emailalert=True,
reststrokes=reststrokes,
period=period,
emailalert=emailalert,
workouttype=workouttype
workouttype=workouttype,
boattype=boattype,
)
alert.save()
@@ -95,7 +96,8 @@ def alert_get_stats(alert,nperiod=0):
columns += condition.metric
workouts = Workout.objects.filter(date__gte=startdate,date__lte=enddate,user=alert.rower,
workouttype=alert.workouttype,duplicate=False)
workouttype=alert.workouttype,duplicate=False,
boattype=alert.boattype)
ids = [w.id for w in workouts]
df = getsmallrowdata_db(columns,ids=ids,doclean=True,workstrokesonly=workstrokesonly)