From 677c522f01b9aa583de64cd5bc78162550fdec87 Mon Sep 17 00:00:00 2001 From: Andrew McLeod Date: Mon, 12 Aug 2019 07:36:23 +0100 Subject: [PATCH] fix: Python3 urllib use in item_group.py (now uses six.moves) (#18642) --- erpnext/setup/doctype/item_group/item_group.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py index cab21162c7..33ab992568 100644 --- a/erpnext/setup/doctype/item_group/item_group.py +++ b/erpnext/setup/doctype/item_group/item_group.py @@ -3,7 +3,6 @@ from __future__ import unicode_literals import frappe -import urllib import copy from frappe.utils import nowdate, cint, cstr from frappe.utils.nestedset import NestedSet @@ -12,6 +11,7 @@ from frappe.website.render import clear_cache from frappe.website.doctype.website_slideshow.website_slideshow import get_slideshow from erpnext.shopping_cart.product_info import set_product_info_for_website from erpnext.utilities.product import get_qty_in_stock +from six.moves.urllib.parse import quote class ItemGroup(NestedSet, WebsiteGenerator): nsm_parent_field = 'parent_item_group' @@ -165,7 +165,7 @@ def get_item_for_list_in_html(context): # add missing absolute link in files # user may forget it during upload if (context.get("website_image") or "").startswith("files/"): - context["website_image"] = "/" + urllib.quote(context["website_image"]) + context["website_image"] = "/" + quote(context["website_image"]) context["show_availability_status"] = cint(frappe.db.get_single_value('Products Settings', 'show_availability_status')) @@ -218,4 +218,4 @@ def get_item_group_defaults(item, company): row.pop("name") return row - return frappe._dict() \ No newline at end of file + return frappe._dict()