removes temporary records in powertimefitnessmetric
This commit is contained in:
@@ -32,7 +32,9 @@ def do_update(user,mode='rower',days=42):
|
||||
else:
|
||||
max_workout_id = max([m.last_workout for m in ms])
|
||||
last_update_date = max([m.date.strftime('%Y-%m-%d') for m in ms])
|
||||
|
||||
|
||||
|
||||
|
||||
if mode == 'rower':
|
||||
workouts = Workout.objects.filter(
|
||||
user=r,
|
||||
@@ -50,6 +52,7 @@ def do_update(user,mode='rower',days=42):
|
||||
except ValueError:
|
||||
max_id = 0
|
||||
|
||||
|
||||
if last_update_date < now_date and max_workout_id < max_id:
|
||||
job = myqueue(queue,
|
||||
handle_updatefitnessmetric,
|
||||
|
||||
Reference in New Issue
Block a user