Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Credit Limit Email not working #23059

Merged
merged 5 commits into from
Sep 2, 2020

Conversation

marination
Copy link
Collaborator

Issues:

  • get_users_with_role on line 396 returns a list of users. Same list was cast into yet another list on line 429. Thus recipients = [["abc@example.com"]]. This caused :
         File ".../apps/frappe/frappe/email/queue.py", line 85, in send
             recipients = list(set(recipients))
         TypeError: unhashable type: 'list'
    
  • The credit controllers users list was formatted to ===> user (Fullname). This overwrote recipients list from ["abc@example.com"] to ["John Doe (abc@example.com)] which is invalid as a recipient address.

    Screenshot 2020-08-17 at 4 04 46 PM

Fixes:

  • don't cast into list again while invoking frappe.sendmail
  • Separate credit controller users list and the formatted list with better naming to reduce confusion. Send credit controller users list as argument in frappe.sendmail

@deepeshgarg007
Copy link
Member

@marination One more PR for the fix is also open #23026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants