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

Bug fix in "backend.config.Settings" #6587

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions backend/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ def assemble_db_connection(
TASK_AUTOUNLOCK_AFTER: str = os.getenv("TM_TASK_AUTOUNLOCK_AFTER", "2h")

# Configuration for sending emails
MAIL_SERVER: Optional[str] = os.getenv("TM_SMTP_HOST", None)
MAIL_SERVER: Optional[str] = os.getenv("TM_SMTP_HOST", "")
MAIL_PORT: str = os.getenv("TM_SMTP_PORT", "587")
MAIL_USE_TLS: bool = bool(int(os.getenv("TM_SMTP_USE_TLS", True)))
MAIL_USE_SSL: bool = bool(int(os.getenv("TM_SMTP_USE_SSL", False)))
MAIL_USERNAME: Optional[str] = os.getenv("TM_SMTP_USER", None)
MAIL_PASSWORD: Optional[str] = os.getenv("TM_SMTP_PASSWORD", None)
MAIL_USERNAME: Optional[str] = os.getenv("TM_SMTP_USER", "")
MAIL_PASSWORD: Optional[str] = os.getenv("TM_SMTP_PASSWORD", "")
MAIL_DEFAULT_SENDER: str = os.getenv(
"TM_EMAIL_FROM_ADDRESS", "[email protected]"
)
Expand All @@ -132,12 +132,12 @@ def assemble_db_connection(
"""

_params: dict = json.loads(os.getenv("SMTP_CREDENTIALS", None))
MAIL_SERVER: str = _params.get("SMTP_HOST", None)
MAIL_SERVER: str = _params.get("SMTP_HOST", "")
MAIL_PORT: str = _params.get("SMTP_PORT", "587")
MAIL_USE_TLS: bool = bool(int(_params.get("SMTP_USE_TLS", True)))
MAIL_USE_SSL: bool = bool(int(_params.get("SMTP_USE_SSL", False)))
MAIL_USERNAME: str = _params.get("SMTP_USER", None)
MAIL_PASSWORD: str = _params.get("SMTP_PASSWORD", None)
MAIL_USERNAME: str = _params.get("SMTP_USER", "")
MAIL_PASSWORD: str = _params.get("SMTP_PASSWORD", "")

# If disabled project update emails will not be sent.
SEND_PROJECT_EMAIL_UPDATES: bool = bool(
Expand Down Expand Up @@ -257,7 +257,7 @@ def assemble_db_connection(
IMAGE_UPLOAD_API_URL: str = _params.get("IMAGE_UPLOAD_API_URL", None)

# Sentry backend DSN
SENTRY_BACKEND_DSN: str = os.getenv("TM_SENTRY_BACKEND_DSN", None)
SENTRY_BACKEND_DSN: Optional[str] = os.getenv("TM_SENTRY_BACKEND_DSN", None)

# Ohsome Stats Token
OHSOME_STATS_TOKEN: str = os.getenv("OHSOME_STATS_TOKEN", "")
Expand Down
Loading