mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-18 12:39:18 +00:00
[minor] fix in patch
This commit is contained in:
@@ -5,6 +5,8 @@ from __future__ import unicode_literals
|
|||||||
import webnotes, os
|
import webnotes, os
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
|
import shutil
|
||||||
|
|
||||||
webnotes.reload_doc("core", "doctype", "doctype")
|
webnotes.reload_doc("core", "doctype", "doctype")
|
||||||
|
|
||||||
tables = webnotes.conn.sql_list("show tables")
|
tables = webnotes.conn.sql_list("show tables")
|
||||||
@@ -16,7 +18,7 @@ def execute():
|
|||||||
|
|
||||||
path = os.path.join(get_base_path(), "app", "setup", "doctype", "for_territory")
|
path = os.path.join(get_base_path(), "app", "setup", "doctype", "for_territory")
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
os.system("rm -rf {path}".format(path=path))
|
shutil.rmtree(path)
|
||||||
|
|
||||||
if webnotes.conn.exists("DocType", "For Territory"):
|
if webnotes.conn.exists("DocType", "For Territory"):
|
||||||
webnotes.delete_doc("DocType", "For Territory")
|
webnotes.delete_doc("DocType", "For Territory")
|
||||||
@@ -5,9 +5,10 @@ from __future__ import unicode_literals
|
|||||||
import webnotes, os
|
import webnotes, os
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
|
import shutil
|
||||||
from webnotes.utils import get_base_path
|
from webnotes.utils import get_base_path
|
||||||
|
|
||||||
for dt in ("item_price", "price_list"):
|
for dt in ("item_price", "price_list"):
|
||||||
path = os.path.join(get_base_path(), "app", "setup", "doctype", dt)
|
path = os.path.join(get_base_path(), "app", "setup", "doctype", dt)
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
os.system("rm -rf {path}".format(path=path))
|
shutil.rmtree(path)
|
||||||
Reference in New Issue
Block a user