mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
Black 23 enforces some slightly more specific rules about empty line counts and redundant parenthesis removal, but the result is still compatible with Black 22. (This does not actually upgrade our Python environment to Black 23 yet.) Signed-off-by: Anders Kaseorg <anders@zulip.com>
21 lines
599 B
Python
21 lines
599 B
Python
from django.db import migrations
|
|
from django.db.backends.postgresql.schema import BaseDatabaseSchemaEditor
|
|
from django.db.migrations.state import StateApps
|
|
|
|
|
|
def set_tutorial_status_to_finished(
|
|
apps: StateApps, schema_editor: BaseDatabaseSchemaEditor
|
|
) -> None:
|
|
UserProfile = apps.get_model("zerver", "UserProfile")
|
|
UserProfile.objects.update(tutorial_status="F")
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [
|
|
("zerver", "0108_fix_default_string_id"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(set_tutorial_status_to_finished, elidable=True),
|
|
]
|