registration: Tie PreregistrationUser to the original MultiUseInvite.

Fixes #21266.

We want to tie the prereg_user to the MultiUseInvite directly rather
than to the MultiUserInvite's confirmation object, because the latter is
not possible. This is because the flow is that after going through the
multiuse invite link, the PreregistrationUser is created together with a
Confirmation object, creating a confirmation link (via
create_confirmation_link) to which then the user is redirected to finish
account creation. This means that the PreregistrationUser is already
tied to a Confirmation, so that attribute is occupied.
This commit is contained in:
Mateusz Mandera
2022-07-21 23:38:59 +02:00
committed by Tim Abbott
parent 5697c047fc
commit 39d8a81e51
6 changed files with 46 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
# Generated by Django 4.0.6 on 2022-07-21 20:10
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("zerver", "0398_tsvector_statistics"),
]
operations = [
migrations.AddField(
model_name="preregistrationuser",
name="multiuse_invite",
field=models.ForeignKey(
null=True, on_delete=django.db.models.deletion.SET_NULL, to="zerver.multiuseinvite"
),
),
]