[fix] update_limits
This commit is contained in:
parent
21edc27a2c
commit
537cd8a5eb
1 changed files with 2 additions and 6 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue