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
Convert MAIL_DEFAULT_SENDER to a string #1007
Conversation
Strange, the CI did not run... |
Github is having issues recently with this. |
ihatemoney/run.py
Outdated
@@ -102,6 +102,15 @@ def validate_configuration(app): | |||
if "MAIL_DEFAULT_SENDER" not in app.config: | |||
app.config["MAIL_DEFAULT_SENDER"] = default_settings.DEFAULT_MAIL_SENDER | |||
|
|||
if type(app.config["MAIL_DEFAULT_SENDER"]) == tuple: | |||
warnings.warn( | |||
"MAIL_DEFAULT_SENDER is not a tuple anymore and should be converted to a simple string." |
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.
We might want to provide the config line to change, since we have the tuple?
Looks good to me, we can probably make the life of the admins easier by letting them know what the new config line should look like in their case. |
What? Helping admin? This is a weird requirement! |
warnings.warn( | ||
"MAIL_DEFAULT_SENDER is not a tuple anymore and should be converted to a simple string." | ||
"MAIL_DEFAULT_SENDER has been changed from tuple to string." | ||
+ f" It was converted to '{app.config['MAIL_DEFAULT_SENDER']}'." |
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.
👍
Fixes #1005