Fixed check for pseudo-release.

The 'status' field is potentially null, and in this case the dictionary key it is not returned by the API. Using get will return null in this case. Tested locally and this solves the issue!
This commit is contained in:
James Harding 2023-06-29 05:11:57 +01:00 committed by GitHub
parent ade730d331
commit ed2d4fd9c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -746,7 +746,7 @@ def album_for_id(releaseid: str) -> Optional[beets.autotag.hooks.AlbumInfo]:
# resolve linked release relations
actual_res = None
if res['release']['status'] == 'Pseudo-Release':
if res['release'].get('status') == 'Pseudo-Release':
actual_res = _find_actual_release_from_pseudo_release(res)
except musicbrainzngs.ResponseError: