mirror of https://github.com/zulip/zulip.git
models: Delete unused Subscription.notifications field.
This deletes the unused Subscription.notifications field and removes it from some testing and analytics code (which should not have been using it in the first place). Fixes #10042.
This commit is contained in:
parent
064fca5b76
commit
34ae3dfd44
|
@ -145,7 +145,7 @@ class Command(BaseCommand):
|
|||
len(markup_messages), sum([elt["count"] for elt in markup_messages])))
|
||||
|
||||
# Notifications for stream messages
|
||||
notifications = active_user_subs.filter(notifications=True).values(
|
||||
notifications = active_user_subs.filter(desktop_notifications=True).values(
|
||||
"user_profile").annotate(count=Count("user_profile"))
|
||||
print("%d users receive desktop notifications for %d streams" % (
|
||||
len(notifications), sum([elt["count"] for elt in notifications])))
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.13 on 2018-07-26 18:38
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('zerver', '0175_change_realm_audit_log_event_type_tense'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='subscription',
|
||||
name='notifications',
|
||||
),
|
||||
]
|
|
@ -1692,10 +1692,6 @@ class Subscription(models.Model):
|
|||
push_notifications = models.BooleanField(default=False) # type: bool
|
||||
email_notifications = models.BooleanField(default=False) # type: bool
|
||||
|
||||
# Combination desktop + audible notifications superseded by the
|
||||
# above.
|
||||
notifications = models.BooleanField(default=False) # type: bool
|
||||
|
||||
class Meta:
|
||||
unique_together = ("user_profile", "recipient")
|
||||
|
||||
|
|
Loading…
Reference in New Issue