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.

actions: Use transaction.atomic in do_change_logo_source.

Sahil Batra64d1dc65255c
diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py
index c75e4445d86..5eabb2c19b0 100644
--- a/zerver/lib/actions.py
+++ b/zerver/lib/actions.py
@@ -4710,6 +4710,7 @@ def do_change_icon_source(
)
[email protected](durable=True)
def do_change_logo_source(
realm: Realm, logo_source: str, night: bool, *, acting_user: Optional[UserProfile]
) -> None:
@@ -4736,7 +4737,7 @@ def do_change_logo_source(
property="night_logo" if night else "logo",
data=get_realm_logo_data(realm, night),
)
- send_event(realm, event, active_user_ids(realm.id))
+ transaction.on_commit(lambda: send_event(realm, event, active_user_ids(realm.id)))
@transaction.atomic(durable=True)