From ed2d4fd9c85aeb21c3c439d763b0020b89b88ee7 Mon Sep 17 00:00:00 2001 From: James Harding Date: Thu, 29 Jun 2023 05:11:57 +0100 Subject: [PATCH] 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! --- beets/autotag/mb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beets/autotag/mb.py b/beets/autotag/mb.py index c7dba1bc8..2f0f99ff1 100644 --- a/beets/autotag/mb.py +++ b/beets/autotag/mb.py @@ -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: