mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-03 23:51:22 -04:00
Display broadcasts without a template
At the moment the admin app expects all broadcasts to have a template, and expects the content of the alert to come from the template. This commit makes it so those pages can still get a `Template` instance, but populated with content straight from the `content` field in the database.
This commit is contained in:
@@ -656,6 +656,7 @@ def broadcast_message_json(
|
||||
cancelled_by_id=None,
|
||||
areas=None,
|
||||
content=None,
|
||||
reference=None,
|
||||
template_name='Example template',
|
||||
):
|
||||
return {
|
||||
@@ -667,6 +668,7 @@ def broadcast_message_json(
|
||||
'template_version': 123,
|
||||
'template_name': template_name,
|
||||
'content': content or 'This is a test',
|
||||
'reference': reference,
|
||||
|
||||
'personalisation': {},
|
||||
'areas': areas or [
|
||||
|
||||
Reference in New Issue
Block a user