fix: s3 sucess email sent even when checkbox not selected
This commit is contained in:
parent
20032d89ea
commit
cba0050db8
1 changed files with 1 additions and 2 deletions
|
|
@ -19,7 +19,7 @@ def send_email(success, service_name, doctype, email_field, error_status=None):
|
|||
return
|
||||
|
||||
if success:
|
||||
if not frappe.db.get_value(doctype, None, "send_email_for_successful_backup"):
|
||||
if not int(frappe.db.get_value(doctype, None, "send_email_for_successful_backup")):
|
||||
return
|
||||
|
||||
subject = "Backup Upload Successful"
|
||||
|
|
@ -28,7 +28,6 @@ def send_email(success, service_name, doctype, email_field, error_status=None):
|
|||
<p>Hi there, this is just to inform you that your backup was successfully uploaded to your {0} bucket. So relax!</p>""".format(
|
||||
service_name
|
||||
)
|
||||
|
||||
else:
|
||||
subject = "[Warning] Backup Upload Failed"
|
||||
message = """
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue