2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 19:45:46 +00:00

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

View File

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