mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 12:21:58 +00:00
Previous cleanups (mostly the removals of Python __future__ imports) were done in a way that introduced leading newlines. Delete leading newlines from all files, except static/assets/zulip-emoji/NOTICE, which is a verbatim copy of the Apache 2.0 license. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
16 lines
635 B
Python
16 lines
635 B
Python
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"])
|