From 280c7a410a751aeb12e96dffb4f50ffb57ef266f Mon Sep 17 00:00:00 2001 From: tundebabzy Date: Tue, 17 Apr 2018 11:32:17 +0100 Subject: [PATCH] code review: make use of db_insert and change `Auto Repeat` to `auto_repeat` --- erpnext/patches/v10_1/transfer_subscription_to_auto_repeat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/patches/v10_1/transfer_subscription_to_auto_repeat.py b/erpnext/patches/v10_1/transfer_subscription_to_auto_repeat.py index 25a35f2bf3..cdb013d69b 100644 --- a/erpnext/patches/v10_1/transfer_subscription_to_auto_repeat.py +++ b/erpnext/patches/v10_1/transfer_subscription_to_auto_repeat.py @@ -14,7 +14,7 @@ def execute(): frappe.reload_doc('accounts', 'doctype', 'journal_entry') frappe.reload_doc('buying', 'doctype', 'purchase_order') frappe.reload_doc('buying', 'doctype', 'supplier_quotation') - frappe.reload_doc('desk', 'doctype', 'Auto Repeat') + frappe.reload_doc('desk', 'doctype', 'auto_repeat') frappe.reload_doc('selling', 'doctype', 'quotation') frappe.reload_doc('selling', 'doctype', 'sales_order') frappe.reload_doc('stock', 'doctype', 'purchase_receipt') @@ -28,4 +28,4 @@ def execute(): for doc in subscriptions: doc['doctype'] = 'Auto Repeat' auto_repeat = frappe.get_doc(doc) - auto_repeat.insert() + auto_repeat.db_insert()