Coverage for app/venv/lib/python3.14/site-packages/weblate/accounts/migrations/0013_bot_notifications.py: 100%
7 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 07:15 +0000
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 07:15 +0000
1# Copyright © Michal Čihař <michal@weblate.org>
2#
3# SPDX-License-Identifier: GPL-3.0-or-later
5# Generated by Django 5.1.4 on 2024-12-11 11:35
7from django.db import migrations
10def disable_bot_notifications(apps, schema_editor) -> None:
11 Subscription = apps.get_model("accounts", "Subscription")
12 Subscription.objects.filter(user__is_bot=True).delete()
15class Migration(migrations.Migration):
16 dependencies = [
17 ("accounts", "0012_alter_auditlog_activity_profile_last_2fa"),
18 ("weblate_auth", "0003_alter_autogroup_options_alter_autogroup_group_and_more"),
19 ]
21 operations = [
22 migrations.RunPython(
23 disable_bot_notifications, migrations.RunPython.noop, elidable=True
24 ),
25 ]