Skip to content

Commit

Permalink
fix: patch - Duplicate entry quality inspection parameter (backport #…
Browse files Browse the repository at this point in the history
…38262) (#38265)

fix: patch - Duplicate entry quality inspection parameter (#38262)

(cherry picked from commit 0ca7527)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
  • Loading branch information
mergify[bot] and rohitwaghchaure authored Nov 22, 2023
1 parent a9429e1 commit 095d99d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions erpnext/patches/v13_0/convert_qi_parameter_to_link_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 095d99d

Please sign in to comment.