Skip to content

Commit

Permalink
fixed hint display and added exceptiopn for no email recipients
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelkornblum committed Apr 11, 2023
1 parent 373c38c commit 591be19
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
8 changes: 1 addition & 7 deletions django_feedback_govuk/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,7 @@ def __init__(self, *args, **kwargs):
legend_size=Size.MEDIUM,
),
Fieldset(
HTML(
(
"<p class='govuk-hint'>",
dfg_settings.COPY_FIELD_COMMENT_HINT,
"</p>",
)
),
HTML(f"<p class='govuk-hint'>{dfg_settings.COPY_FIELD_COMMENT_HINT}</p>"),
Field("comment"),
legend=dfg_settings.COPY_FIELD_COMMENT_LEGEND,
legend_size=Size.MEDIUM,
Expand Down
3 changes: 3 additions & 0 deletions django_feedback_govuk/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ def email(personalisation: Dict):
)
email_addresses = dfg_settings.FEEDBACK_NOTIFICATION_EMAIL_RECIPIENTS

if len(email_addresses) < 1:
raise Exception("No feedback recipients configured")

for email_address in email_addresses:
message_response = notification_client.send_email_notification(
email_address=email_address,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "django-feedback-govuk"
version = "0.1.1"
version = "0.1.2"
description = "A Django app to gather and send internal Government staff feedback"
authors = ["jafacakes2011 <[email protected]>", "marcelkornblum <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 591be19

Please sign in to comment.