shinkan-jinkendo/backend/routers
Lars a37400bb22
Some checks failed
Deploy Development / deploy (push) Successful in 34s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 2m2s
fix: correct dict cursor access in MediaWiki import
Error: 500 Internal Server Error on execute import
Root cause: Using fetchone()[0] with RealDictCursor (dict-like rows)

PostgreSQL RealDictCursor returns dict-like objects, not tuples.
Accessing [0] on a dict throws TypeError.

Fix: Changed all fetchone()[0] to fetchone()['id']
Locations:
- Line 163: log_id after INSERT INTO wiki_import_log
- Line 485: ex_id after INSERT INTO exercises
- Line 599: skill_id after INSERT INTO skills
- Line 616: method_id after INSERT INTO training_methods

This matches the pattern used in other routers (exercises.py, etc.)
2026-04-24 20:37:31 +02:00
..
auth.py fix: auth register - correct column name created_at 2026-04-24 16:07:13 +02:00
catalogs.py feat: Hierarchical Admin UI - Tree View for Catalogs 2026-04-24 07:51:40 +02:00
clubs.py feat: Clubs & Organization Management complete 2026-04-22 16:48:02 +02:00
exercises.py fix: exercises.py - use direct VARCHAR for age_groups (no catalog table in Shinkan) 2026-04-24 15:27:11 +02:00
import_wiki.py fix: correct dict cursor access in MediaWiki import 2026-04-24 20:37:31 +02:00
profiles.py fix: Add /profiles/me endpoint for session persistence 2026-04-22 15:46:40 +02:00
skills.py feat: Skills & Methods catalog complete 2026-04-22 16:50:31 +02:00
training_planning.py feat: Training Planning (core feature) complete 2026-04-22 16:54:34 +02:00