Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
migrations: Fix possible 0257_fix_has_link_attribute.py failure.
Iam-VM285e10fe2fd4
diff --git a/zerver/migrations/0257_fix_has_link_attribute.py b/zerver/migrations/0257_fix_has_link_attribute.pyindex a2b29376f99..a494f707134 100644--- a/zerver/migrations/0257_fix_has_link_attribute.py+++ b/zerver/migrations/0257_fix_has_link_attribute.py@@ -13,9 +13,9 @@ BATCH_SIZE = 1000def process_batch(apps: StateApps, id_start: int, id_end: int, last_id: int) -> None:Message = apps.get_model("zerver", "Message")for message in Message.objects.filter(id__gte=id_start, id__lte=id_end).order_by("id"):- if message.rendered_content == "":+ if message.rendered_content in ["", None]:# There have been bugs in the past that made it possible- # for a message to have "" as its rendered_content; we+ # for a message to have "" or None as its rendered_content; we# need to skip those because lxml won't process them.## They should safely already have the correct state