Problem: 221 exercises skipped, but only 2 actually in database Root cause: Failed imports created wiki_import_references entries, but exercises were never saved (due to earlier bugs) Duplicate check only verified references existed, not actual data. Result: All subsequent imports skipped 'already imported' items. Solution: - Enhanced duplicate check to verify BOTH reference AND actual entity - If reference exists but entity is missing → delete orphaned reference - Item will be re-imported on same run (no manual cleanup needed) Check logic: 1. Find reference in wiki_import_references 2. Check if exercises/skills/methods table has matching local_id 3. If both exist → skip (true duplicate) 4. If reference exists but entity missing → delete reference + re-import This auto-heals broken state from previous failed imports. |
||
|---|---|---|
| .. | ||
| auth.py | ||
| catalogs.py | ||
| clubs.py | ||
| exercises.py | ||
| import_wiki.py | ||
| profiles.py | ||
| skills.py | ||
| training_planning.py | ||