From 1a005337d8925bac659b2ceedfcb0199ff3f24c9 Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Tue, 16 Apr 2019 09:29:29 +0530 Subject: [PATCH] fix: Do not rename or move files for custom doctype --- frappe/core/doctype/doctype/doctype.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frappe/core/doctype/doctype/doctype.py b/frappe/core/doctype/doctype/doctype.py index 484f12811c..62884aed81 100644 --- a/frappe/core/doctype/doctype/doctype.py +++ b/frappe/core/doctype/doctype/doctype.py @@ -343,7 +343,8 @@ class DocType(Document): if merge: frappe.throw(_("DocType can not be merged")) - if not frappe.flags.in_test and not frappe.flags.in_patch: + # Do not rename and move files and folders for custom doctype + if not self.custom and not frappe.flags.in_test and not frappe.flags.in_patch: self.rename_files_and_folders(old, new) def after_rename(self, old, new, merge=False):