Ensure workouts are printed in order of start date descending
This commit is contained in:
3
utils.py
3
utils.py
@@ -17,6 +17,9 @@ def get_workouts(topsets):
|
||||
'StartDate': topsets_in_workout[0]['StartDate'],
|
||||
'TopSets': [{"TopSetId": t['TopSetId'], "ExerciseId": t['ExerciseId'], "ExerciseName": t['ExerciseName'], "Weight": t['Weight'], "Repetitions": t['Repetitions']} for t in topsets_in_workout if t['TopSetId'] is not None]
|
||||
})
|
||||
|
||||
workouts.sort(key=lambda x: x['StartDate'], reverse=True)
|
||||
|
||||
return workouts
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user