From 1bfeafca5f862eeeb0848357e0fbae567483796d Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Thu, 15 Apr 2021 16:08:18 +0530 Subject: [PATCH] fix: Check if `data-is-group` should be `true` before getting doc --- frappe/core/doctype/user/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/core/doctype/user/user.py b/frappe/core/doctype/user/user.py index b9889026fe..0462de8643 100644 --- a/frappe/core/doctype/user/user.py +++ b/frappe/core/doctype/user/user.py @@ -1018,7 +1018,7 @@ def extract_mentions(txt): soup = BeautifulSoup(txt, 'html.parser') emails = [] for mention in soup.find_all(class_='mention'): - if mention.get('data-is-group'): + if mention.get('data-is-group') == 'true': try: user_group = frappe.get_cached_doc('User Group', mention['data-id']) emails += [d.user for d in user_group.user_group_members]