Fix bug where updating exercise name would persist due to missing commit
This commit is contained in:
@@ -13,9 +13,7 @@ class Exercises:
|
||||
return exercise
|
||||
|
||||
def update_exercise_name(self, exercise_id, updated_name):
|
||||
sql = "UPDATE exercise SET name = %s WHERE exercise_id = %s;"
|
||||
params = [updated_name, exercise_id]
|
||||
self.execute(sql, params)
|
||||
self.execute("UPDATE exercise SET name = %s WHERE exercise_id = %s;", [updated_name, exercise_id], commit=True)
|
||||
updated_exercise = self.get_exercise(exercise_id)
|
||||
return updated_exercise
|
||||
|
||||
|
||||
Reference in New Issue
Block a user