Refactor start_date as date rather then string

This commit is contained in:
Peter Stockings
2022-11-27 13:22:37 +11:00
parent 304e480e89
commit cd5f0fcf58
5 changed files with 25 additions and 13 deletions

2
db.py
View File

@@ -193,7 +193,7 @@ class DataBase():
'PersonId': next((t['PersonId'] for t in topsets), -1),
'PersonName': next((t['PersonName'] for t in topsets), 'Unknown'),
'WorkoutId': workout_id,
'StartDate': topsets[0]['StartDate'].strftime("%Y-%m-%d"),
'StartDate': topsets[0]['StartDate'],
'Exercises': self.get_exercises(),
'TopSets': [{"TopSetId": t['TopSetId'], "ExerciseId": t['ExerciseId'], "ExerciseName": t['ExerciseName'], "Weight": t['Weight'], "Repetitions": t['Repetitions']} for t in topsets if t['TopSetId'] is not None]
}