# HG changeset patch # User Marcin Kuzminski # Date 2018-02-01 18:17:35 # Node ID 80b18ba847cd10d4871fcb0e7cffdd8787231175 # Parent c5a11bd9744c5d8c174bc2169bc2fda9007717b1 audit-logs: handle query syntax in whosh query parser. - fixes #5431 diff --git a/rhodecode/lib/user_log_filter.py b/rhodecode/lib/user_log_filter.py --- a/rhodecode/lib/user_log_filter.py +++ b/rhodecode/lib/user_log_filter.py @@ -106,11 +106,14 @@ def user_log_filter(user_log, search_ter elif isinstance(term, query.DateRange): field = term.fieldname val = [term.startdate, term.enddate] + elif isinstance(term, query.NullQuery.__class__): + field = '' + val = '' else: field = term.fieldname val = term.text - - user_log = user_log.filter(get_filterion(field, val, term)) + if field: + user_log = user_log.filter(get_filterion(field, val, term)) elif isinstance(qry, query.Or): filters = [] for term in qry: