I’ve set what I believe is correct a notification when a doctype is saved. I keep receiving this error in the error log:
Traceback with variables (most recent call last):
File “apps/frappe/frappe/email/doctype/notification/notification.py”, line 131, in send
self.send_an_email(doc, context)
self = <Notification: Check Request Approval Flow>
doc = <Document: 85ad730928>
context = {‘doc’: <Document: 85ad730928>, ‘alert’: <Notification: Check Request Approval Flow>, ‘comments’: None}
File “apps/frappe/frappe/email/doctype/notification/notification.py”, line 207, in send_an_email
recipients, cc, bcc = self.get_list_of_recipients(doc, context)
self = <Notification: Check Request Approval Flow>
doc = <Document: 85ad730928>
context = {‘doc’: <Document: 85ad730928>, ‘alert’: <Notification: Check Request Approval Flow>, ‘comments’: None}
formataddr = <function formataddr at 0x7f07232ad990>
make_communication = <function _make at 0x7f071d2f51b0>
subject = ‘Submitted Check Request Needs Review’
attachments = None
File “apps/frappe/frappe/email/doctype/notification/notification.py”, line 267, in get_list_of_recipients
if not frappe.safe_eval(recipient.condition, None, context):
self = <Notification: Check Request Approval Flow>
doc = <Document: 85ad730928>
context = {‘doc’: <Document: 85ad730928>, ‘alert’: <Notification: Check Request Approval Flow>, ‘comments’: None}
recipients = []
cc = []
bcc = []
recipient = <NotificationRecipient: 93fd946737 parent=Check Request Approval Flow>
File “apps/frappe/frappe/init.py”, line 2274, in safe_eval
return eval(code, eval_globals, eval_locals)
code = ’ ’
eval_globals = {‘builtins’: {}, ‘int’: <class ‘int’>, ‘float’: <class ‘float’>, ‘long’: <class ‘int’>, ‘round’: }
eval_locals = {‘doc’: <Document: 85ad730928>, ‘alert’: <Notification: Check Request Approval Flow>, ‘comments’: None}
whitelisted_globals = {‘int’: <class ‘int’>, ‘float’: <class ‘float’>, ‘long’: <class ‘int’>, ‘round’: }
UNSAFE_ATTRIBUTES = {‘tb_frame’, ‘cr_frame’, ‘ag_frame’, ‘cr_origin’, ‘gi_frame’, ‘cr_code’, ‘format_map’, ‘gi_code’, ‘format’, ‘tb_next’, ‘ag_code’}
attribute = ‘ag_code’
builtins.SyntaxError: invalid syntax (, line 0)
Can anyone help ?