fix: Check if data-is-group should be true before getting doc
This commit is contained in:
parent
b2649eda1e
commit
1bfeafca5f
1 changed files with 1 additions and 1 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue