fix: filter user by email instead of name
This commit is contained in:
parent
6df534a333
commit
93e6cc4ac1
1 changed files with 1 additions and 1 deletions
|
|
@ -61,7 +61,7 @@ def make_notification_logs(doc, users):
|
|||
from frappe.social.doctype.energy_point_settings.energy_point_settings import is_energy_point_enabled
|
||||
|
||||
for user in users:
|
||||
if frappe.db.exists('User', {"name": user, "enabled": 1}):
|
||||
if frappe.db.exists('User', {"email": user, "enabled": 1}):
|
||||
if is_notifications_enabled(user):
|
||||
if doc.type == 'Energy Point' and not is_energy_point_enabled():
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue