mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-22 16:16:39 +00:00
default existing users to no tour
This commit is contained in:
parent
495bac2b50
commit
baad1314d8
1 changed files with 6 additions and 0 deletions
|
@ -3,6 +3,10 @@
|
|||
import bookwyrm.models.fields
|
||||
from django.db import migrations
|
||||
|
||||
def existing_users_default(apps, schema_editor):
|
||||
db_alias = schema_editor.connection.alias
|
||||
user_model = apps.get_model("bookwyrm", "User")
|
||||
user_model.objects.using(db_alias).filter(local=True).update(show_guided_tour=False)
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
|
@ -16,4 +20,6 @@ class Migration(migrations.Migration):
|
|||
name="show_guided_tour",
|
||||
field=bookwyrm.models.fields.BooleanField(default=True),
|
||||
),
|
||||
migrations.RunPython(existing_users_default, migrations.RunPython.noop),
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in a new issue