From cae633c821a45f66c89685cb306601c22f75fffe Mon Sep 17 00:00:00 2001 From: Heinz Wiesinger Date: Sun, 2 Dec 2018 11:50:12 +0100 Subject: [PATCH] Account for items that do not have flexible attributes --- beets/dbcore/db.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/beets/dbcore/db.py b/beets/dbcore/db.py index ccff66be6c..63744887f0 100755 --- a/beets/dbcore/db.py +++ b/beets/dbcore/db.py @@ -578,10 +578,7 @@ def _get_objects(self): else: while self._rows: row = self._rows.pop(0) - if flex_attrs: - obj = self._make_model(row, flex_attrs[row['id']]) - else: - obj = self._make_model(row) + obj = self._make_model(row, flex_attrs.get(row['id'], {})) # If there is a slow-query predicate, ensurer that the # object passes it. if not self.query or self.query.match(obj):