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

Convert MAIL_DEFAULT_SENDER to a string #1007

Merged
merged 3 commits into from Apr 7, 2022

Conversation

Glandos
Copy link
Member

@Glandos Glandos commented Mar 20, 2022

Fixes #1005

@zorun
Copy link
Collaborator

zorun commented Mar 23, 2022

Strange, the CI did not run...

@almet
Copy link
Member

almet commented Mar 24, 2022

Strange, the CI did not run...

Github is having issues recently with this.

@@ -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."
Copy link
Member

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?

@almet
Copy link
Member

almet commented Mar 24, 2022

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.

@Glandos
Copy link
Member Author

Glandos commented Mar 27, 2022

What? Helping admin? This is a weird requirement!
OK, I was looking for a Sunday joke. I implemented this, of course 👍

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']}'."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@zorun zorun merged commit 5f4f69b into spiral-project:master Apr 7, 2022
TomRoussel pushed a commit to TomRoussel/ihatemoney that referenced this pull request Mar 2, 2024
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.

MAIL_DEFAULT_SENDER format causes a crash on Docker
3 participants