Fix template search numeric comparison failing when comparing to a floating point number

This commit is contained in:
Charles Haley 2020-11-22 12:11:52 +00:00
parent f6bd75ecd4
commit d6158358ba

View File

@ -265,7 +265,8 @@ class NumericSearch(object): # {{{
cast = lambda x: 0 if x is None else int(x) cast = lambda x: 0 if x is None else int(x)
adjust = lambda x: x // 2 adjust = lambda x: x // 2
else: else:
cast = float if dt in ('float', 'composite', 'half-rating') else int # Datatype is empty if the source is a tempate. Assume float
cast = float if dt in ('float', 'composite', 'half-rating', '') else int
mult = 1.0 mult = 1.0
if len(query) > 1: if len(query) > 1: