mirror of
https://github.com/beetbox/beets.git
synced 2026-07-22 02:06:50 -04:00
Sorting by a field whose declared type is nullable (its null value is `None`, e.g. `NullInteger`/`NullFloat`) raised `TypeError: '<' not supported between instances of ...` when the field was present on some objects but missing on others, because `FieldSort.sort` compared `None` against real values. Group missing values together in the sort key so they are never compared against present ones: they are ordered first when sorting ascending and last when descending, matching SQLite's default ordering of NULLs used by the fast `FixedFieldSort` path. Fixes #3461. Co-Authored-By: Claude <noreply@anthropic.com>