Wizard fails to process actions when a group referred to in an Action is deleted

Environment

Discourse Version: v3.1.0.beta8 +142

Plugin Commit: 1f35b80f

Steps to Reproduce

  1. Create a Wizard with the Add To Group action
  2. Add a group
  3. Run the Wizard and confirm that it works
  4. Delete the group
  5. Run the Wizard
  6. It hangs on after hitting the Done button
  7. Subsequent actions do not occur, and a submission is not recorded

I do note that:

  • The group disappears from the Action in the edit wizard page appropriately
  • The group ID remains in the Wizard .json
  • Manually removing the deleted group ID from the .json fixes the problem

Example

https://discourse.digitalhealth.net/admin/wizards/wizard/dhn_com_survey_2021

Closed forum sorry. But quite easy to repro.

Logs

Console:
Screenshot 2023-08-19 09.32.44