replaced string_types with basestring

This commit is contained in:
Achilles Rasquinha
2018-02-15 11:39:45 +05:30
parent 806a18b511
commit 1697a7aa81
10 changed files with 28 additions and 14 deletions

View File

@@ -8,6 +8,8 @@ from frappe import _
from frappe.utils import cstr, now_datetime, cint, flt, get_time
from erpnext.controllers.status_updater import StatusUpdater
from six import string_types
class UOMMustBeIntegerError(frappe.ValidationError): pass
class TransactionBase(StatusUpdater):
@@ -139,7 +141,7 @@ def delete_events(ref_type, ref_name):
where ref_type=%s and ref_name=%s""", (ref_type, ref_name)), for_reload=True)
def validate_uom_is_integer(doc, uom_field, qty_fields, child_dt=None):
if isinstance(qty_fields, basestring):
if isinstance(qty_fields, string_types):
qty_fields = [qty_fields]
distinct_uoms = list(set([d.get(uom_field) for d in doc.get_all_children()]))