Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GOVNotify integration will fail if a list is passed through that has no list items to show #1079

Open
ziggy-cyb opened this issue May 24, 2023 · 0 comments

Comments

@ziggy-cyb
Copy link
Collaborator

Describe the bug
If using the GOVNotify output, and passing through a list, and every item in that list has a condition that equates to false, undefined will be passed to the personalisation object instead of an empty string. This will cause GOVNotify to send back a 400 bad request response.

To Reproduce
Steps to reproduce the behavior:

  1. Create a form with a yes/no component and email address component on the first page and a list with one item in it
  2. Add a condition which checks the yes/no component
  3. Apply the condition to the one list item in the list
  4. Create a GOVNotify template that prints out the list
  5. Create a GOVnotify output, passing in the template ID of the template just created, and pass the list as a personalisation
  6. Preview the form, choose "no" for the yes/no field, type in your email for the email field, and submit the form
  7. The GOVNotify api will respond with the 400 error

Expected behavior
The email is sent to your address with an empty string shown for the list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant