mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
Fix pyhton 3 compatibility
This commit is contained in:
@@ -3,12 +3,13 @@ import frappe, requests, json
|
|||||||
from frappe.utils import now
|
from frappe.utils import now
|
||||||
from frappe.frappeclient import FrappeClient
|
from frappe.frappeclient import FrappeClient
|
||||||
from frappe.desk.form.load import get_attachments
|
from frappe.desk.form.load import get_attachments
|
||||||
|
from six import string_types
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def call_hub_method(method, params=None):
|
def call_hub_method(method, params=None):
|
||||||
connection = get_hub_connection()
|
connection = get_hub_connection()
|
||||||
|
|
||||||
if type(params) == unicode:
|
if isinstance(params, string_types):
|
||||||
params = json.loads(params)
|
params = json.loads(params)
|
||||||
|
|
||||||
params.update({
|
params.update({
|
||||||
|
|||||||
Reference in New Issue
Block a user