Hi guys,
I’m trying to customize the notifications for the leave application in my custom app, I made a notification function and call it in my notifications file as such:
def get_notification_config():
return {
“for_doctype”: {
‘Leave Application’:‘mycustomApp.notifications.leave_application_notification_count’
}
}
and it raises me an error which is
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 57, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 923, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/notifications.py”, line 255, in get_open_count
filters[fieldname] = name
TypeError: ‘unicode’ object does not support item assignment
I think he mean using function instead of filters like frappe notifications
I created a new app in a new instance the error in one function in the file get_open_count
it does not test if the filter is not a dictionary.
it assumes that all references of the filter are dictionary.
I think you should make an issue with it.
best regards