fix: exercises.py - handle dict rows in fetchone() for INSERT RETURNING
This commit is contained in:
parent
e80c8e01e1
commit
b617b5a2d8
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user