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.

topic: Add a None check with an assertion.

Zixuan James Lie382cec015e7
diff --git a/zerver/lib/topic.py b/zerver/lib/topic.py
index 3ff86e65e3d..e020f66925e 100644
--- a/zerver/lib/topic.py
+++ b/zerver/lib/topic.py
@@ -184,6 +184,7 @@ def update_messages_for_topic_edit(
if new_stream is not None:
update_fields.append("recipient")
for m in messages_list:
+ assert new_stream.recipient is not None
m.recipient = new_stream.recipient
if topic_name is not None:
update_fields.append("subject")