mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-25 22:22:26 +00:00
Merge branch 'choose_password_during_user_creation' of gitlab.federez.net:re2o/re2o into choose_password_during_user_creation
This commit is contained in:
commit
fb191b4c8e
1 changed files with 4 additions and 1 deletions
|
@ -16,11 +16,14 @@ class Migration(migrations.Migration):
|
|||
users = apps.get_model("users", "User")
|
||||
users.objects.using(db_alias).all().update(email_state=0)
|
||||
|
||||
def undo_flag_verified(apps, schema_editor):
|
||||
return
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='user',
|
||||
name='email_state',
|
||||
field=models.IntegerField(choices=[(0, 'Verified'), (1, 'Unverified'), (2, 'Waiting for email confirmation')], default=2),
|
||||
),
|
||||
migrations.RunPython(flag_verified),
|
||||
migrations.RunPython(flag_verified, undo_flag_verified),
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue