mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
The real /code-review and /simplify passes over this PR, which an earlier run substituted hand review for. `from_stored_criteria` dropped the entries the model rejects. Dropping a filter drops the constraint with it, so a row holding `platform_ids: [3, "gba"]` widened from one platform to the whole library. It now answers None, and the one caller turns that into a query matching nothing: the loop over every smart collection still cannot be stopped by one bad row, and a collection never shows more than its criteria claim. `/api/roms/download` declared `collection_id` and `smart_collection_id` unbounded while `get_roms_scalar` validates them through the model, so `collection_id=0` raised inside the handler as a 500. They now carry the `ge=1` the other two routes already declare, and fail at the boundary as a 422. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MLreYqGLgHJLei6NThVXCz