Email settings not configured - remove need for user and password (#4492)

Fixes #4473
This commit is contained in:
Matthias Mair 2023-03-15 00:11:21 +01:00 committed by GitHub
parent 1ba51e51c3
commit cebdb9e29f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,19 +61,13 @@ def is_email_configured():
if not settings.TESTING: # pragma: no cover
logger.debug("EMAIL_HOST is not configured")
if not settings.EMAIL_HOST_USER:
configured = False
# Display warning unless in test mode
if not settings.TESTING: # pragma: no cover
logger.debug("EMAIL_HOST_USER is not configured")
# Display warning unless in test mode
if not settings.TESTING: # pragma: no cover
logger.debug("EMAIL_HOST_USER is not configured")
if not settings.EMAIL_HOST_PASSWORD:
configured = False
# Display warning unless in test mode
if not settings.TESTING: # pragma: no cover
logger.debug("EMAIL_HOST_PASSWORD is not configured")
# Display warning unless in test mode
if not settings.TESTING: # pragma: no cover
logger.debug("EMAIL_HOST_PASSWORD is not configured")
return configured