mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +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>
33 lines
982 B
Python
33 lines
982 B
Python
# Generated by Django 1.11.20 on 2019-05-08 05:42
|
|
|
|
from django.db import migrations, models
|
|
from django.db.backends.postgresql.schema import BaseDatabaseSchemaEditor
|
|
from django.db.migrations.state import StateApps
|
|
|
|
|
|
def disable_realm_digest_emails_enabled(
|
|
apps: StateApps, schema_editor: BaseDatabaseSchemaEditor
|
|
) -> None:
|
|
Realm = apps.get_model("zerver", "Realm")
|
|
realms = Realm.objects.filter(digest_emails_enabled=True)
|
|
realms.update(digest_emails_enabled=False)
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [
|
|
("zerver", "0218_remove_create_stream_by_admins_only"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AlterField(
|
|
model_name="realm",
|
|
name="digest_emails_enabled",
|
|
field=models.BooleanField(default=False),
|
|
),
|
|
migrations.RunPython(
|
|
disable_realm_digest_emails_enabled,
|
|
reverse_code=migrations.RunPython.noop,
|
|
elidable=True,
|
|
),
|
|
]
|