mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 13:07:09 +01:00
Formatted mapping uses field type to determine default
This commit is contained in:
parent
659a0862f6
commit
1e207395b3
1 changed files with 3 additions and 1 deletions
|
|
@ -55,7 +55,9 @@ class FormattedMapping(collections.Mapping):
|
|||
def __len__(self):
|
||||
return len(self.model_keys)
|
||||
|
||||
def get(self, key, default=u''):
|
||||
def get(self, key, default=None):
|
||||
if default is None:
|
||||
default = self.model._type(key).format(None)
|
||||
return super(FormattedMapping, self).get(key, default)
|
||||
|
||||
def _get_formatted(self, model, key):
|
||||
|
|
|
|||
Loading…
Reference in a new issue