Wizard wrongly adds multiple groups to a single user

Environment

Discourse Version: c245b743

Plugin Commit: 47a1a3d7

Steps to Reproduce

I created a series of steps to add users to a certain group as they choose, to give an example in this case I have recreated the problem with only two groups: Group A and Group B, users should only be able to choose one option and be added to this option will terminate the wizard, but if for some reason the user returns and decides to choose another option, the wizard takes both values and integrates the user into the two groups.

Example:
The user must choose an option and chooses Group A:
First Step Group A selected

The user goes to the final step, but returns to the first step.
Final Step Group A selected

Go back to the first step and now choose Group B:
Group B

Again in the final step, the user can check that they have indeed chosen Group B and finish.
Final Step Group B selected

When entering the community, the wizard automatically adds you to both groups and is able to see the two categories assigned to those groups.
Category A and B

My configuration is the following:

Steps
Steps

Actions:
Actions

Example

https://comunidad.forounadm.com/w/select-group

It is necessary to register with a gmail email, this will add them to the “Test-Users” group (temporarily), in the community and access the link manually, since at the moment I am working in said community and I cannot configure the wizard so that it enters when logging in.

Logs

GET https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX net::ERR_FAILED

The problem is your action is set to run after the step where you collect the ‘answer’. This means that it adds the group on each pass through the step.

If you change Run After to Wizard Completion you should be all good.