From a2c7741e2183d4434b9e7d345074a389c4e910b4 Mon Sep 17 00:00:00 2001 From: Marvin Marx Date: Sun, 5 May 2019 17:43:38 +0200 Subject: [PATCH] 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. --- cps/web.py | 1 - 1 file changed, 1 deletion(-) diff --git a/cps/web.py b/cps/web.py index cdfd5f26..321ad15c 100644 --- a/cps/web.py +++ b/cps/web.py @@ -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':