From 8e16f441dcaf01db140353a9785df21e8018f63a Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Wed, 22 Nov 2023 14:02:01 +0530 Subject: [PATCH] fix: patch - Duplicate entry quality inspection parameter (#38262) (cherry picked from commit 0ca7527f7abddcab59edce434d0e68e1deebfc33) --- erpnext/patches/v13_0/convert_qi_parameter_to_link_field.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/patches/v13_0/convert_qi_parameter_to_link_field.py b/erpnext/patches/v13_0/convert_qi_parameter_to_link_field.py index e53bdf8f19e3..08ddbbf3375b 100644 --- a/erpnext/patches/v13_0/convert_qi_parameter_to_link_field.py +++ b/erpnext/patches/v13_0/convert_qi_parameter_to_link_field.py @@ -21,6 +21,9 @@ def execute(): params = set({x.casefold(): x for x in params}.values()) for parameter in params: + if frappe.db.exists("Quality Inspection Parameter", parameter): + continue + frappe.get_doc( {"doctype": "Quality Inspection Parameter", "parameter": parameter, "description": parameter} ).insert(ignore_permissions=True)