mark_all_messages_unread: Remove reset of depricated pointer.

This commit is contained in:
Aman Agrawal 2020-07-04 14:19:43 +05:30 committed by Tim Abbott
parent c234b4f254
commit a7eef1ed35
1 changed files with 1 additions and 2 deletions

View File

@ -5,7 +5,7 @@ from django.core.cache import cache
from django.core.management.base import BaseCommand
from django.db.models import F
from zerver.models import UserMessage, UserProfile
from zerver.models import UserMessage
class Command(BaseCommand):
@ -14,5 +14,4 @@ class Command(BaseCommand):
def handle(self, *args: Any, **options: Any) -> None:
assert settings.DEVELOPMENT
UserMessage.objects.all().update(flags=F('flags').bitand(~UserMessage.flags.read))
UserProfile.objects.all().update(pointer=0)
cache._cache.flush_all()