diff --git a/backend/routers/exercises.py b/backend/routers/exercises.py index 8a67aa3..d60b169 100644 --- a/backend/routers/exercises.py +++ b/backend/routers/exercises.py @@ -401,7 +401,8 @@ def create_exercise( body.visibility, body.status, profile_id, body.club_id, ) ) - exercise_id = cur.fetchone()[0] + row = cur.fetchone() + exercise_id = row['id'] if isinstance(row, dict) else row[0] conn.commit() # M:N Relations zuweisen