mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
[queries] [optimization] removed redundant code in get_match_cond
This commit is contained in:
@@ -36,12 +36,8 @@ def get_filters_cond(doctype, filters, conditions):
|
|||||||
return cond
|
return cond
|
||||||
|
|
||||||
def get_match_cond(doctype, searchfield = 'name'):
|
def get_match_cond(doctype, searchfield = 'name'):
|
||||||
meta = webnotes.get_doctype(doctype)
|
|
||||||
from webnotes.widgets.search import get_std_fields_list
|
|
||||||
fields = get_std_fields_list(meta, searchfield)
|
|
||||||
|
|
||||||
from webnotes.widgets.reportview import build_match_conditions
|
from webnotes.widgets.reportview import build_match_conditions
|
||||||
cond = build_match_conditions(doctype, fields)
|
cond = build_match_conditions(doctype)
|
||||||
|
|
||||||
if cond:
|
if cond:
|
||||||
cond = ' and ' + cond
|
cond = ' and ' + cond
|
||||||
|
|||||||
Reference in New Issue
Block a user