mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-03 13:58:43 +00:00
lint migration file
This commit is contained in:
parent
245120e7ca
commit
02c6932409
1 changed files with 2 additions and 1 deletions
|
@ -3,11 +3,13 @@
|
||||||
import bookwyrm.models.fields
|
import bookwyrm.models.fields
|
||||||
from django.db import migrations
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
def existing_users_default(apps, schema_editor):
|
def existing_users_default(apps, schema_editor):
|
||||||
db_alias = schema_editor.connection.alias
|
db_alias = schema_editor.connection.alias
|
||||||
user_model = apps.get_model("bookwyrm", "User")
|
user_model = apps.get_model("bookwyrm", "User")
|
||||||
user_model.objects.using(db_alias).filter(local=True).update(show_guided_tour=False)
|
user_model.objects.using(db_alias).filter(local=True).update(show_guided_tour=False)
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
@ -22,4 +24,3 @@ class Migration(migrations.Migration):
|
||||||
),
|
),
|
||||||
migrations.RunPython(existing_users_default, migrations.RunPython.noop),
|
migrations.RunPython(existing_users_default, migrations.RunPython.noop),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue