[queries] [optimization] removed redundant code in get_match_cond

This commit is contained in:
Anand Doshi 2013-07-30 14:40:44 +05:30
parent f314051e30
commit 7180eb6f20

View File

@ -36,12 +36,8 @@ def get_filters_cond(doctype, filters, conditions):
return cond
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
cond = build_match_conditions(doctype, fields)
cond = build_match_conditions(doctype)
if cond:
cond = ' and ' + cond