shinkan-jinkendo/backend/routers
Lars 97a7fe7cba
Some checks failed
Deploy Development / deploy (push) Successful in 54s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m55s
fix: reimport dict-cursor bug + add admin cleanup endpoint
Problem 1: Reimport fails completely (all exercises fail)
Root cause: Line 465 existing[0] instead of existing['id']
Fix: Changed to existing['id'] for dict-cursor compatibility

Problem 2: 221 exercises skipped, only 2 in database
Root cause: Orphaned wiki_import_references from failed imports
Fix: New admin endpoint to manually cleanup orphaned references

New endpoints:
- DELETE /api/import/mediawiki/admin/cleanup-orphaned-references
  Deletes all references where local_id doesn't exist in target table
  Returns count of deleted references per type

- GET /api/import/mediawiki/admin/stats
  Shows references vs. actual count + orphaned count
  Helps diagnose import state issues

Usage:
1. Call cleanup endpoint to remove orphaned references
2. Run normal import (reimport=false)
3. Should import all previously failed exercises
2026-04-27 08:52:05 +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_admin.py fix: reimport dict-cursor bug + add admin cleanup endpoint 2026-04-27 08:52:05 +02:00
import_wiki.py fix: reimport dict-cursor bug + add admin cleanup endpoint 2026-04-27 08:52:05 +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