Files
Auto_Bangumi/backend
ZzzzSsssWwww 6235892de2 fix(rss): cascade-delete torrents when deleting RSSItem (#1019)
Deleting an RSSItem failed with sqlite3.IntegrityError: FOREIGN KEY constraint failed when child torrents still referenced it, leaving the sidebar entry stuck in the UI.

- delete() now removes referencing torrents in the same transaction before removing the RSSItem
- Adds missing session.rollback() in the exception path
- rss_loop wraps each iteration to skip stale RSSItems deleted mid-loop via API
- Tests enable PRAGMA foreign_keys=ON to match production and gain 5 cascade-delete regression tests

Closes #1010
Closes #1017
2026-04-19 12:50:09 +02:00
..
…
…