From 4f6f9f32933bf4aef4625bb57e4285be9af09d03 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 20 May 2020 23:30:27 +0530 Subject: [PATCH] fix: check for self linking (bp #10181) (#10426) --- frappe/desk/form/linked_with.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frappe/desk/form/linked_with.py b/frappe/desk/form/linked_with.py index 5f5f6e4f82..72917d0341 100644 --- a/frappe/desk/form/linked_with.py +++ b/frappe/desk/form/linked_with.py @@ -43,6 +43,9 @@ def get_submitted_linked_docs(doctype, name, docs=None, linked=None): linked[link_doctype] = [] for link in link_names: + if link['name'] == name: + continue + if linked and name in linked[link_doctype]: continue