diff --git a/frappe/email/__init__.py b/frappe/email/__init__.py index 0f8b879c09..b7c8a92673 100644 --- a/frappe/email/__init__.py +++ b/frappe/email/__init__.py @@ -100,7 +100,7 @@ def get_communication_doctype(doctype, txt, searchfield, start, page_len, filter results = [] txt_lower = txt.lower().replace("%", "") - for dt in com_doctypes: + for dt in list(set(com_doctypes)): if dt in can_read: if txt_lower in dt.lower() or txt_lower in _(dt).lower(): results.append([dt]) diff --git a/frappe/public/js/frappe/form/controls/link.js b/frappe/public/js/frappe/form/controls/link.js index 253c9377de..9bb1796272 100644 --- a/frappe/public/js/frappe/form/controls/link.js +++ b/frappe/public/js/frappe/form/controls/link.js @@ -441,7 +441,9 @@ frappe.ui.form.ControlLink = class ControlLink extends frappe.ui.form.ControlDat if (newArr.length === 0) return [currElem]; let element_with_same_value = newArr.find((e) => e.value === currElem.value); if (element_with_same_value) { - element_with_same_value.description += `, ${currElem.description}`; + if (currElem.description) { + element_with_same_value.description += `, ${currElem.description}`; + } return [...newArr]; } return [...newArr, currElem];