mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
actions: Use transaction.atomic for do_add_realm_playground.
This commit is contained in:
@@ -8101,9 +8101,10 @@ def notify_realm_playgrounds(
|
|||||||
realm: Realm, realm_playgrounds: List[Dict[str, Union[int, str]]]
|
realm: Realm, realm_playgrounds: List[Dict[str, Union[int, str]]]
|
||||||
) -> None:
|
) -> None:
|
||||||
event = dict(type="realm_playgrounds", realm_playgrounds=realm_playgrounds)
|
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)))
|
||||||
|
|
||||||
|
|
||||||
|
@transaction.atomic(durable=True)
|
||||||
def do_add_realm_playground(
|
def do_add_realm_playground(
|
||||||
realm: Realm, *, acting_user: Optional[UserProfile], **kwargs: Any
|
realm: Realm, *, acting_user: Optional[UserProfile], **kwargs: Any
|
||||||
) -> int:
|
) -> int:
|
||||||
|
|||||||
Reference in New Issue
Block a user