mirror of https://github.com/zulip/zulip.git
users: Add transaction.atomic decorator to do_update_bot_config_data.
The db operations in do_update_bot_config_data should be atomic.
This commit is contained in:
parent
8f2727fcea
commit
30edd1a3b0
|
@ -563,11 +563,12 @@ def do_update_outgoing_webhook_service(
|
|||
)
|
||||
|
||||
|
||||
@transaction.atomic(durable=True)
|
||||
def do_update_bot_config_data(bot_profile: UserProfile, config_data: dict[str, str]) -> None:
|
||||
for key, value in config_data.items():
|
||||
set_bot_config(bot_profile, key, value)
|
||||
updated_config_data = get_bot_config(bot_profile)
|
||||
send_event(
|
||||
send_event_on_commit(
|
||||
bot_profile.realm,
|
||||
dict(
|
||||
type="realm_bot",
|
||||
|
|
Loading…
Reference in New Issue