mirror of
https://github.com/janeczku/calibre-web
synced 2024-12-18 22:20:30 +00:00
Catch error on search for new custom column (created after start of calibre-web)
This commit is contained in:
parent
b2a28cd39a
commit
25add6511f
@ -1327,7 +1327,11 @@ def render_adv_search_results(term, offset=None, order=None, limit=None):
|
|||||||
q = q.filter(db.Books.comments.any(func.lower(db.Comments.text).ilike("%" + description + "%")))
|
q = q.filter(db.Books.comments.any(func.lower(db.Comments.text).ilike("%" + description + "%")))
|
||||||
|
|
||||||
# search custom culumns
|
# search custom culumns
|
||||||
|
try:
|
||||||
q = adv_search_custom_columns(cc, term, q)
|
q = adv_search_custom_columns(cc, term, q)
|
||||||
|
except AttributeError as ex:
|
||||||
|
log.debug_or_exception(ex)
|
||||||
|
flash(_("Error on search for custom columns, please restart Calibre-Web"), category="error")
|
||||||
|
|
||||||
q = q.order_by(*order).all()
|
q = q.order_by(*order).all()
|
||||||
flask_session['query'] = json.dumps(term)
|
flask_session['query'] = json.dumps(term)
|
||||||
|
Loading…
Reference in New Issue
Block a user