mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix error when using _daysago in search queries. Fixes #1185398 (_daysago search)
This commit is contained in:
parent
d836bfff3c
commit
d0b8e4248f
@ -367,7 +367,7 @@ class ResultCache(SearchQueryParser): # {{{
|
||||
qd = now()
|
||||
field_count = 2
|
||||
elif query.endswith(self.local_daysago) or query.endswith(self.untrans_daysago):
|
||||
num = query[0:-self.local_daysago_len]
|
||||
num = query[0:-(self.local_daysago_len if query.endswith(self.local_daysago) else self.untrans_daysago_len)]
|
||||
try:
|
||||
qd = now() - timedelta(int(num))
|
||||
except:
|
||||
|
Loading…
x
Reference in New Issue
Block a user