1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-17 15:24:53 +00:00

Bugfix search with excluded shelfs

This commit is contained in:
Ozzie Isaacs 2021-10-30 07:31:12 +02:00
parent 382cd9458f
commit 1294672809
2 changed files with 462 additions and 284 deletions

View File

@ -1186,7 +1186,7 @@ def adv_search_serie(q, include_series_inputs, exclude_series_inputs):
def adv_search_shelf(q, include_shelf_inputs, exclude_shelf_inputs):
q = q.outerjoin(ub.BookShelf, db.Books.id == ub.BookShelf.book_id)\
.filter(or_(ub.BookShelf.shelf is None, ub.BookShelf.shelf.notin_(exclude_shelf_inputs)))
.filter(or_(ub.BookShelf.shelf == None, ub.BookShelf.shelf.notin_(exclude_shelf_inputs)))
if len(include_shelf_inputs) > 0:
q = q.filter(ub.BookShelf.shelf.in_(include_shelf_inputs))
return q

File diff suppressed because it is too large Load Diff