-
Notifications
You must be signed in to change notification settings - Fork 714
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: type validation on to_emails parameter on mail object #920
fix: type validation on to_emails parameter on mail object #920
Conversation
Thanks for the PR! Everything looks good, but would you please add tests to verify no error is thrown with the |
Tests are in @eshanholtz ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you for the contribution :)
This breaks my code, the type check now won't allow anything else than Mail(to_emails=[To(job.email, job.company_name),
Bcc('[email protected]', 'Honza')], ...) Do I use |
The original intention was for the |
@eshanholtz Thank you! What is the preferred way of doing this if this worked only by accident? Also, let me know if I can help with the fix. |
@honzajavorek I'd say the way you were doing it is a perfectly valid use of |
Awesome, thanks! |
Fixes #778
Validated values at runtime for a clearer error message for when someone sets
to_emails
to a list of lists