fix(reportview): use .pop instead of del

- use .pop() instead of del to avoid KeyError
This commit is contained in:
Suraj Shetty 2019-02-20 13:10:11 +05:30 committed by GitHub
parent 78c3a5de2d
commit bc05377352
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,8 +27,8 @@ def get_form_params():
"""Stringify GET request parameters."""
data = frappe._dict(frappe.local.form_dict)
del data["cmd"]
del data["data"]
data.pop('cmd', None)
data.pop('data', None)
if "csrf_token" in data:
del data["csrf_token"]