convert operator to lowercase while checking

This commit is contained in:
Shridhar 2019-11-28 18:07:14 +05:30
parent acae06a36a
commit 44c7f08ccf

View file

@ -513,7 +513,7 @@ class DatabaseQuery(object):
or not can_be_null
or (f.value and f.operator.lower() in ('=', 'like'))
or 'ifnull(' in column_name.lower()):
if f.operator == 'like' and frappe.conf.get('db_type') == 'postgres':
if f.operator.lower() == 'like' and frappe.conf.get('db_type') == 'postgres':
f.operator = 'ilike'
condition = '{column_name} {operator} {value}'.format(
column_name=column_name, operator=f.operator,