mirror of
https://github.com/rommapp/romm.git
synced 2026-06-28 14:56:01 +00:00
Drop the name_sort_key_custom flag/migration in favour of a flagless rule: a key is "custom" when it no longer equals compute(name). Apply that consistently across all three write paths so a manual sort key survives renames while a derived key keeps following the name: - @validates re-derives on name assignment only when the stored key still matches the derived value; direct name_sort_key assignment stores a normalized custom key (or reverts to derived when cleared). Handles both kwarg orders at construction. - update_rom mirrors the same check for the bulk update() path it bypasses. - The edit endpoint only writes the key when the user actually changed the field, delegating the untouched case to update_rom. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>