stages/password: fix change_flow being deleted instead of renamed

This commit is contained in:
Jens Langhammer 2020-09-25 20:33:06 +02:00
parent 769ce1c642
commit 974c2ddb11
2 changed files with 6 additions and 5 deletions

View File

@ -23,9 +23,8 @@ class TestFlowsStageSetup(SeleniumTestCase):
slug="default-password-change", designation=FlowDesignation.STAGE_CONFIGURATION, slug="default-password-change", designation=FlowDesignation.STAGE_CONFIGURATION,
) )
stages = PasswordStage.objects.filter(name="default-authentication-password") stage = PasswordStage.objects.get(name="default-authentication-password")
stage = stages.first() stage.configure_flow = flow
stage.change_flow = flow
stage.save() stage.save()
new_password = generate_client_secret() new_password = generate_client_secret()

View File

@ -15,8 +15,10 @@ class Migration(migrations.Migration):
] ]
operations = [ operations = [
migrations.RemoveField(model_name="passwordstage", name="change_flow",), migrations.RenameField(
migrations.AddField( model_name="passwordstage", old_name="change_flow", new_name="configure_flow"
),
migrations.AlterField(
model_name="passwordstage", model_name="passwordstage",
name="configure_flow", name="configure_flow",
field=models.ForeignKey( field=models.ForeignKey(