Override FormattedItemMapping.model_keys

model_keys was inferred from `self.keys(True)`, which would include the
fallback album keys. Since FormattedItemMapping has its own algorithm
for album attributes, we only care about the item's *actual* keys.
This commit is contained in:
FichteFoll 2018-07-22 20:26:23 +02:00
parent 72515448ad
commit a112358f76
No known key found for this signature in database
GPG key ID: 9FA3981C07CD83C5

View file

@ -376,6 +376,9 @@ class FormattedItemMapping(dbcore.db.FormattedMapping):
def __init__(self, item, for_path=False):
super(FormattedItemMapping, self).__init__(item, for_path)
# We treat album and item keys specially here,
# so exclude transitive album keys from the model's keys.
self.model_keys = item.keys(computed=True, with_album=False)
self.item = item
@lazy_property