style: Resolve code correctness warning

This commit is contained in:
Suraj Shetty 2021-04-28 15:03:14 +05:30
parent c2bbc99c6d
commit 87fa672250
3 changed files with 2 additions and 3 deletions

View file

@ -185,7 +185,7 @@ def make_form_dict(request):
args = request.form or request.args
if not isinstance(args, dict):
frappe.throw("Invalid request arguments")
frappe.throw(_("Invalid request arguments"))
try:
frappe.local.form_dict = frappe._dict({ k:v[0] if isinstance(v, (list, tuple)) else v \

View file

@ -313,7 +313,7 @@ class Session:
""", (self.sid, get_expiry_period_for_query(self.device)))
if rec:
data = frappe._dict(eval(rec and rec[0][1] or '{}'))
data = frappe._dict(frappe.safe_eval(rec and rec[0][1] or '{}'))
data.user = rec[0][0]
else:
self._delete_session()

View file

@ -1,5 +1,4 @@
import frappe
from frappe import _
class WebPage(object):
def __init__(self, path=None, http_status_code=None):