mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-22 02:40:02 +00:00
refactor: parse native JSON request args in setup/doctype/holiday_list/holiday_list.py
Use frappe.parse_json instead of json.loads so the whitelisted endpoints accept native JSON types (list/dict/bool) in addition to JSON strings.
This commit is contained in:
@@ -176,7 +176,7 @@ def get_events(start: DateTimeLikeObject, end: DateTimeLikeObject, filters: str
|
||||
:param filters: Filters (JSON).
|
||||
"""
|
||||
if filters:
|
||||
filters = json.loads(filters)
|
||||
filters = frappe.parse_json(filters)
|
||||
else:
|
||||
filters = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user