chore: fix linter

This commit is contained in:
phot0n 2022-07-23 17:27:50 +05:30
parent a52483f110
commit 090d0321a8
2 changed files with 7 additions and 1 deletions

View file

@ -199,7 +199,7 @@ scheduler_events = {
"frappe.email.queue.flush",
"frappe.email.doctype.email_account.email_account.pull",
"frappe.email.doctype.email_account.email_account.notify_unreplied",
'frappe.utils.global_search.sync_global_search',
"frappe.utils.global_search.sync_global_search",
"frappe.monitor.flush",
],
"hourly": [

View file

@ -28,15 +28,19 @@ def make_request(method, url, auth=None, headers=None, data=None):
frappe.log_error()
raise exc
def make_get_request(url, **kwargs):
return make_request("GET", url, **kwargs)
def make_post_request(url, **kwargs):
return make_request("POST", url, **kwargs)
def make_put_request(url, **kwargs):
return make_request("PUT", url, **kwargs)
def create_request_log(
data,
integration_type=None,
@ -87,9 +91,11 @@ def create_request_log(
return integration_request
def get_json(obj):
return obj if isinstance(obj, str) else frappe.as_json(obj, indent=1)
def json_handler(obj):
if isinstance(obj, (datetime.date, datetime.timedelta, datetime.datetime)):
return str(obj)