Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

migrations: Switch message_model type to Any.

Anders Kaseorgfd617b24f220
diff --git a/zerver/migrations/0377_message_edit_history_format.py b/zerver/migrations/0377_message_edit_history_format.py
index e3d73d38e23..33542d25583 100644
--- a/zerver/migrations/0377_message_edit_history_format.py
+++ b/zerver/migrations/0377_message_edit_history_format.py
@@ -1,11 +1,11 @@
import time
-from typing import List, Optional, Type, TypedDict
+from typing import Any, List, Optional, Type, TypedDict
import orjson
from django.db import migrations, transaction
from django.db.backends.postgresql.schema import BaseDatabaseSchemaEditor
from django.db.migrations.state import StateApps
-from django.db.models import Min, Model
+from django.db.models import Min
BATCH_SIZE = 10000
STREAM = 2
@@ -38,7 +38,7 @@ class EditHistoryEvent(TypedDict, total=False):
@transaction.atomic
def backfill_message_edit_history_chunk(
- first_id: int, last_id: int, message_model: Type[Model]
+ first_id: int, last_id: int, message_model: Type[Any]
) -> None:
"""
Migrate edit history events for the messages in the provided range to: