fix(patch): only run disable_email_accounts_with_oauth if connected user is not set (#20799)
This commit is contained in:
parent
6eac7e603e
commit
cd67ad420f
1 changed files with 3 additions and 1 deletions
|
|
@ -3,7 +3,9 @@ from frappe.desk.doctype.notification_log.notification_log import make_notificat
|
|||
|
||||
|
||||
def execute():
|
||||
if not frappe.get_value("Email Account", {"auth_method": "OAuth"}):
|
||||
if frappe.get_all(
|
||||
"Email Account", {"auth_method": "OAuth", "connected_user": ["is", "set"]}, limit=1
|
||||
):
|
||||
return
|
||||
|
||||
# Setting awaiting password to 1 for email accounts where Oauth is enabled.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue