markdown: Pass realm down into render_stream_description.

This guarantees that the Realm is always non-None when we hit the
codepath is_static_or_current_realm_url via
do_change_stream_description, so that we can properly skip rewritting
some images.

Fixes #19405

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
Zixuan James Li
2022-10-29 14:52:47 -04:00
committed by Tim Abbott
parent d02b1f0ae6
commit da9ad7c3a7
7 changed files with 12 additions and 12 deletions

View File

@@ -993,7 +993,7 @@ def do_import_realm(import_dir: Path, subdomain: str, processes: int = 1) -> Rea
)
# Handle rendering of stream descriptions for import from non-Zulip
for stream in data["zerver_stream"]:
stream["rendered_description"] = render_stream_description(stream["description"])
stream["rendered_description"] = render_stream_description(stream["description"], realm)
bulk_import_model(data, Stream)
realm.notifications_stream_id = notifications_stream_id