Skip to content

coreartist: Fix None in year sort

Marinus Schraal requested to merge wip/mschraal/fix-none-year-sort into master

The album sorter failed if the year was not available for an album.

Add a condition for this case.

Error in case:

TypeError: '>' not supported between instances of 'NoneType' and 'NoneType'
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/gi/overrides/__init__.py", line 351, in wrap
    return func(a, b, *user_data)
           ^^^^^^^^^^^^^^^^^^^^^^
  File ".../coreartist.py", line 75, in _album_sort
    if year_a > year_b:

Merge request reports