Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
actions: Use transaction.atomic for do_add_realm_playground.
Sahil Batra578b7527660a
diff --git a/zerver/lib/actions.py b/zerver/lib/actions.pyindex 7c76d176cfc..8164a15a642 100644--- a/zerver/lib/actions.py+++ b/zerver/lib/actions.py@@ -8101,9 +8101,10 @@ def notify_realm_playgrounds(realm: Realm, realm_playgrounds: List[Dict[str, Union[int, str]]]) -> None:event = dict(type="realm_playgrounds", realm_playgrounds=realm_playgrounds)- send_event(realm, event, active_user_ids(realm.id))+ transaction.on_commit(lambda: send_event(realm, event, active_user_ids(realm.id)))[email protected](durable=True)def do_add_realm_playground(realm: Realm, *, acting_user: Optional[UserProfile], **kwargs: Any) -> int: