mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Store: use attrgetter
This commit is contained in:
parent
fd5bd49c74
commit
cc9a15e116
@ -671,9 +671,9 @@ class SearchFilter(SearchQueryParser):
|
|||||||
locations = all_locs if location == 'all' else [location]
|
locations = all_locs if location == 'all' else [location]
|
||||||
q = {
|
q = {
|
||||||
'author': lambda x: x.author.lower(),
|
'author': lambda x: x.author.lower(),
|
||||||
'cover': lambda x: x.cover_url,
|
'cover': attrgetter('cover_url'),
|
||||||
'drm': lambda x: x.drm,
|
'drm': attrgetter('drm'),
|
||||||
'format': lambda x: x.formats,
|
'format': attrgetter('formats'),
|
||||||
'price': lambda x: comparable_price(x.price),
|
'price': lambda x: comparable_price(x.price),
|
||||||
'store': lambda x: x.store_name.lower(),
|
'store': lambda x: x.store_name.lower(),
|
||||||
'title': lambda x: x.title.lower(),
|
'title': lambda x: x.title.lower(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user