Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
populate_db: Remove use of deleted pointer field.
sophie200fae2265e5dd7
diff --git a/zilencer/management/commands/populate_db.py b/zilencer/management/commands/populate_db.pyindex 9e58be1d766..b4d91d40004 100644--- a/zilencer/management/commands/populate_db.py+++ b/zilencer/management/commands/populate_db.py@@ -12,7 +12,7 @@ from django.contrib.sessions.models import Sessionfrom django.core.management import call_commandfrom django.core.management.base import BaseCommand, CommandParserfrom django.db import connection-from django.db.models import F, Max+from django.db.models import Ffrom django.utils.timezone import now as timezone_nowfrom django.utils.timezone import timedelta as timezone_timedelta@@ -850,19 +850,6 @@ class Command(BaseCommand):# Now subscribe everyone to these streamssubscribe_users_to_streams(zulip_realm, zulip_stream_dict)- if not options["test_suite"]:- # Update pointer of each user to point to the last message in their- # UserMessage rows with sender_id=user_profile_id.- users = list(- UserMessage.objects.filter(message__sender_id=F("user_profile_id"))- .values("user_profile_id")- .annotate(pointer=Max("message_id"))- )- for user in users:- UserProfile.objects.filter(id=user["user_profile_id"]).update(- pointer=user["pointer"]- )-create_user_groups()if not options["test_suite"]: