fix: correct type check in sql_like function (#34076)
This commit is contained in:
parent
6d8d7bb90b
commit
83d221c104
1 changed files with 1 additions and 1 deletions
|
|
@ -2008,7 +2008,7 @@ def get_url_to_report_with_filters(name, filters, report_type=None, doctype=None
|
|||
|
||||
|
||||
def sql_like(value: str, pattern: str) -> bool:
|
||||
if not isinstance(pattern, str) and isinstance(value, str):
|
||||
if not (isinstance(pattern, str) and isinstance(value, str)):
|
||||
return False
|
||||
if pattern.startswith("%") and pattern.endswith("%"):
|
||||
return pattern.strip("%") in value
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue