diff --git a/frappe/__init__.py b/frappe/__init__.py index e526ff59fe..02e6edb71a 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -17,7 +17,7 @@ from faker import Faker from .exceptions import * from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template -__version__ = '10.1.19' +__version__ = '10.1.20' __title__ = "Frappe Framework" local = Local() diff --git a/frappe/core/doctype/communication/email.py b/frappe/core/doctype/communication/email.py index 8121e13788..8babfa79da 100755 --- a/frappe/core/doctype/communication/email.py +++ b/frappe/core/doctype/communication/email.py @@ -233,15 +233,20 @@ def get_recipients_cc_and_bcc(doc, recipients, cc, bcc, fetched_from_email_accou # don't cc to people who already received the mail from sender's email service cc = list(set(cc) - set(original_cc) - set(original_recipients)) + remove_administrator_from_email_list(cc) original_bcc = split_emails(doc.bcc) bcc = list(set(bcc) - set(original_bcc) - set(original_recipients)) + remove_administrator_from_email_list(bcc) - if 'Administrator' in recipients: - recipients.remove('Administrator') + remove_administrator_from_email_list(recipients) return recipients, cc, bcc +def remove_administrator_from_email_list(email_list): + if 'Administrator' in email_list: + email_list.remove('Administrator') + def prepare_to_notify(doc, print_html=None, print_format=None, attachments=None): """Prepare to make multipart MIME Email diff --git a/frappe/utils/backups.py b/frappe/utils/backups.py index f0729d672d..7254ba7fd4 100644 --- a/frappe/utils/backups.py +++ b/frappe/utils/backups.py @@ -65,7 +65,7 @@ class BackupGenerator: site = site.replace('.', '_') #Generate a random name using today's date and a 8 digit random number - for_db = todays_date + "-" + site + "-database.sql.gz" + for_db = todays_date + "-" + site + "-database.sql" for_public_files = todays_date + "-" + site + "-files.tar" for_private_files = todays_date + "-" + site + "-private-files.tar" backup_path = get_backup_path() @@ -119,6 +119,8 @@ class BackupGenerator: cmd_string = 'gzip %(backup_path_db)s '% args err, out = frappe.utils.execute_in_shell(cmd_string) + self.backup_path_db = "{0}.gz".format(self.backup_path_db) + def send_email(self): """ Sends the link to backup file located at erpnext/backups