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

Use unicode string for alert email subject. #2605

Closed
wants to merge 1 commit into from
Closed

Conversation

arikfr
Copy link
Member

@arikfr arikfr commented Jun 20, 2018

@@ -123,7 +123,7 @@ def all_settings():

HOST = os.environ.get('REDASH_HOST', '')

ALERTS_DEFAULT_MAIL_SUBJECT_TEMPLATE = os.environ.get('REDASH_ALERTS_DEFAULT_MAIL_SUBJECT_TEMPLATE', "({state}) {alert_name}")
ALERTS_DEFAULT_MAIL_SUBJECT_TEMPLATE = os.environ.get('REDASH_ALERTS_DEFAULT_MAIL_SUBJECT_TEMPLATE', u"({state}) {alert_name}")
Copy link
Member

Choose a reason for hiding this comment

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

I think you'll also want to decode('utf-8') the value in case REDASH_ALERTS_DEFAULT_MAIL_SUBJECT_TEMPLATE is indeed set since it would be a bytestring on Python 2.

Speaking of which, is this the right time to ask about Python 3? 😬

Copy link
Member Author

Choose a reason for hiding this comment

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

Speaking of which, is this the right time to ask about Python 3? 😬

:-) there is actually a pull request to update the code to be compliant with Python 3. But I'm concerned on how to test everything, specially the different query runners?

@arikfr
Copy link
Member Author

arikfr commented Aug 11, 2019

Considering #3137 this is probably no longer needed.

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.

2 participants