fix: exercises.py - handle dict rows in fetchone() for INSERT RETURNING
This commit is contained in:
1 parent
e80c8e01e1
commit
b617b5a2d8
1 file changed
+2
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user