From 0bf2b783638c52604afcd929166aaafcfab90c64 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Mon, 8 Jan 2024 19:36:35 +0530 Subject: [PATCH] chore: add proper comment for db.commit --- frappe/push_notification.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frappe/push_notification.py b/frappe/push_notification.py index d5c74aa275..85703ffcca 100644 --- a/frappe/push_notification.py +++ b/frappe/push_notification.py @@ -204,7 +204,8 @@ class PushNotification: notification_settings.api_key = response["credentials"]["api_key"] notification_settings.api_secret = response["credentials"]["api_secret"] notification_settings.save(ignore_permissions=True) - frappe.db.commit() + # GET request, hence using commit to persist changes + frappe.db.commit() # nosemgrep return notification_settings.api_key, notification_settings.api_secret def _send_post_request(self, method: str, params: dict, use_authentication: bool = True):