[fix] update_limits

This commit is contained in:
Anand Doshi 2016-06-25 18:15:49 +05:30
parent 21edc27a2c
commit 537cd8a5eb

View file

@ -124,14 +124,10 @@ def get_limits():
'''
return frappe._dict(frappe.local.conf.limits or {})
def update_limits(key, value):
def update_limits(limits_dict):
'''Add/Update limit in site_config'''
limits = get_limits()
if isinstance(key, dict):
limits.update(key)
else:
limits[key] = value
limits.update(limits_dict)
update_site_config("limits", limits, validate=False)
frappe.conf.limits = limits