mirror of https://github.com/zulip/zulip.git
management: Remove migrate_stream_notifications.
The script has been broken since `Subscription.notifications` was removed. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
parent
aebed0e57f
commit
c72fe80525
|
@ -1,15 +0,0 @@
|
|||
from typing import Any
|
||||
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from zerver.models import Subscription
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = """One-off script to migration users' stream notification settings."""
|
||||
|
||||
def handle(self, *args: Any, **options: Any) -> None:
|
||||
for subscription in Subscription.objects.all():
|
||||
subscription.desktop_notifications = subscription.notifications
|
||||
subscription.audible_notifications = subscription.notifications
|
||||
subscription.save(update_fields=["desktop_notifications", "audible_notifications"])
|
Loading…
Reference in New Issue