mirror of
https://github.com/beetbox/beets.git
synced 2025-12-30 12:32:33 +01:00
NumericQuery: Check that the field exists
This commit is contained in:
parent
5dec867ab3
commit
044dbfcd38
1 changed files with 3 additions and 1 deletions
|
|
@ -208,7 +208,9 @@ class NumericQuery(FieldQuery):
|
|||
self.rangemax = self._convert(parts[1])
|
||||
|
||||
def match(self, item):
|
||||
value = getattr(item, self.field)
|
||||
if self.field not in item:
|
||||
return False
|
||||
value = item[self.field]
|
||||
if isinstance(value, basestring):
|
||||
value = self._convert(value)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue