Delete workout associated heart rate readings
This commit is contained in:
1
app.py
1
app.py
@@ -199,6 +199,7 @@ def view_workout(user_id, workout_id):
|
||||
def delete_workout(user_id, workout_id):
|
||||
# Delete the workout and its associated cadence readings
|
||||
CadenceReading.query.filter_by(workout_id=workout_id).delete()
|
||||
HeartRateReading.query.filter_by(workout_id=workout_id).delete()
|
||||
db.session.delete(workout)
|
||||
db.session.commit()
|
||||
workouts_data = get_workouts_for_user(user_id)
|
||||
|
||||
@@ -455,7 +455,6 @@
|
||||
// Heart Rate monitor code
|
||||
|
||||
heartRateButton.addEventListener('click', async () => {
|
||||
console.log('heartRateButton clicked, isHearRateMonitorActive: ', isHearRateMonitorActive);
|
||||
if (isHearRateMonitorActive) {
|
||||
console.log('Stopping heart rate monitor...');
|
||||
await disconnectHeartRateMonitor();
|
||||
|
||||
Reference in New Issue
Block a user