diff --git a/docs/sources/open-source/_index.md b/docs/sources/open-source/_index.md index fdc3a1a8..8463fd82 100644 --- a/docs/sources/open-source/_index.md +++ b/docs/sources/open-source/_index.md @@ -195,6 +195,7 @@ Grafana OnCall is capable of sending emails using SMTP as a user notification st - `EMAIL_HOST_USER` - SMTP server user - `EMAIL_HOST_PASSWORD` - SMTP server password - `EMAIL_PORT` (default is `587`) - SMTP server port -- `EMAIL_USE_TLS` (default is `True`) - to enable/disable TLS +- `EMAIL_USE_TLS` (default is `True`) - To enable/disable TLS +- `EMAIL_FROM_ADDRESS` (optional) - Email address used to send emails. If not specified, `EMAIL_HOST_USER` will be used. After enabling the email integration, it will be possible to use the `Notify by email` notification step in user settings. diff --git a/engine/apps/api/serializers/live_setting.py b/engine/apps/api/serializers/live_setting.py index bf431341..15806b0e 100644 --- a/engine/apps/api/serializers/live_setting.py +++ b/engine/apps/api/serializers/live_setting.py @@ -5,7 +5,7 @@ from apps.base.models import LiveSetting class LiveSettingSerializer(serializers.ModelSerializer): id = serializers.CharField(read_only=True, source="public_primary_key") - value = serializers.JSONField(allow_null=False) + value = serializers.JSONField(allow_null=True) class Meta: model = LiveSetting diff --git a/engine/apps/base/models/live_setting.py b/engine/apps/base/models/live_setting.py index 4e2664d7..09845e6f 100644 --- a/engine/apps/base/models/live_setting.py +++ b/engine/apps/base/models/live_setting.py @@ -38,6 +38,7 @@ class LiveSetting(models.Model): "EMAIL_HOST_USER", "EMAIL_HOST_PASSWORD", "EMAIL_USE_TLS", + "EMAIL_FROM_ADDRESS", "TWILIO_ACCOUNT_SID", "TWILIO_AUTH_TOKEN", "TWILIO_NUMBER", @@ -61,6 +62,7 @@ class LiveSetting(models.Model): "EMAIL_HOST_USER": "SMTP server user", "EMAIL_HOST_PASSWORD": "SMTP server password", "EMAIL_USE_TLS": "SMTP enable/disable TLS", + "EMAIL_FROM_ADDRESS": "Email address used to send emails. If not specified, EMAIL_HOST_USER will be used.", "SLACK_SIGNING_SECRET": ( "Check