Files
romm/backend/handler/database
Sam Dornan c2ee769df7 fix(roms): load the parent rom alongside a rom file so the schema validates (#4593)
`GET /api/roms/{id}/files` 500'd on its success path: `RomFileSchema` reads
`is_top_level`, which needs `file.rom`, and `get_rom_file_by_id` only loaded
`track_meta` and `doc_meta`. Validation happens after `begin_session` closes,
so the lazy load raised `DetachedInstanceError`. The parent rom now comes
along in the same load, narrowed to the columns `Rom.full_path` needs.

`last_modified` is nullable in the column but was required in the schema, so
a row added outside a scan validated to nothing. It is now nullable to match,
and the regenerated frontend type follows.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-17 12:20:16 -05:00
..
2026-03-12 23:02:12 -04:00
2026-04-06 22:29:55 -04:00