Minor fix in clear_defaults

This commit is contained in:
Nabin Hait 2014-03-14 15:09:24 +05:30
parent 305d3d7c68
commit 76d5cb2bda

View file

@ -128,7 +128,8 @@ def clear_default(key=None, value=None, parent=None, name=None, parenttype=None)
if not conditions:
raise Exception, "[clear_default] No key specified."
frappe.db.sql("""delete from tabDefaultValue where %s""" % " and ".join(conditions), values)
frappe.db.sql("""delete from tabDefaultValue where {0}""".format(" and ".join(conditions)),
tuple(values))
_clear_cache(parent)
def get_defaults_for(parent="Control Panel"):