chore: add proper comment for db.commit

This commit is contained in:
Tanmoy Sarkar 2024-01-08 19:36:35 +05:30
parent 043ce4bb60
commit 0bf2b78363

View file

@ -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):