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

@@ -1190,7 +1190,7 @@ def do_change_stream_description(
with transaction.atomic():
stream.description = new_description
stream.rendered_description = render_stream_description(new_description)
stream.rendered_description = render_stream_description(new_description, stream.realm)
stream.save(update_fields=["description", "rendered_description"])
RealmAuditLog.objects.create(
realm=stream.realm,