From 7c568aa52894eb78c987ecbc0a72e68ce06d435f 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 14b0553f1c..24c20ef1aa 100755 --- a/beets/dbcore/db.py +++ b/beets/dbcore/db.py @@ -583,10 +583,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):