mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-04 22:13:36 +02:00
Fix error when using _daysago in search queries. Fixes #1185398 (_daysago search)
This commit is contained in:
parent
d836bfff3c
commit
d0b8e4248f
1 changed files with 1 additions and 1 deletions
|
|
@ -367,7 +367,7 @@ def get_dates_matches(self, location, query, candidates):
|
|||
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…
Reference in a new issue