1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-12-25 09:30:31 +00:00

Fix "Internal Server Error" on advanced search

Custom boolean columns return that error if calibre does not have a
custom_column_1 in the DB, as this is queried in the removed line.
However the value is completely unused anyway -> removing.
This commit is contained in:
Marvin Marx 2019-05-05 17:43:38 +02:00
parent b80bfa5260
commit a2c7741e21

View File

@ -2025,7 +2025,6 @@ def advanced_search():
custom_query = request.args.get('custom_column_' + str(c.id))
if custom_query:
if c.datatype == 'bool':
getattr(db.Books, 'custom_column_1')
q = q.filter(getattr(db.Books, 'custom_column_'+str(c.id)).any(
db.cc_classes[c.id].value == (custom_query== "True") ))
elif c.datatype == 'int':