Resolved merge conflicts

This commit is contained in:
Saurabh 2018-08-07 12:47:01 +05:30
commit bece82d6ab
6 changed files with 75 additions and 4 deletions

View file

@ -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, get_jloader)
__version__ = '10.1.44'
__version__ = '10.1.45'
__title__ = "Frappe Framework"
local = Local()

View file

@ -82,6 +82,39 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "1",
"description": "Note: By default emails for failed backups are sent.",
"fieldname": "send_email_for_successful_backup",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Send Email for Successful Backup",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "backup_frequency",
"fieldtype": "Select",
"hidden": 0,
@ -346,7 +379,7 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
"modified": "2018-06-28 21:28:06.612052",
"modified": "2018-08-07 04:00:40.520943",
"modified_by": "Administrator",
"module": "Integrations",
"name": "Dropbox Settings",

View file

@ -64,6 +64,9 @@ def take_backup_to_dropbox(retry_count=0, upload_db_backup=True):
def send_email(success, service_name, error_status=None):
if success:
if frappe.db.get_value("Dropbox Settings", None, "send_email_for_successful_backup") == '0':
return
subject = "Backup Upload Successful"
message ="""<h3>Backup Uploaded Successfully</h3><p>Hi there, this is just to inform you
that your backup was successfully uploaded to your %s account. So relax!</p>

View file

@ -72,6 +72,38 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "1",
"description": "Note: By default emails for failed backups are sent.",
"fieldname": "send_email_for_successful_backup",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Send Email for Successful Backup",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
@ -264,7 +296,7 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
"modified": "2017-10-06 18:27:09.022674",
"modified": "2018-08-07 04:12:43.691760",
"modified_by": "Administrator",
"module": "Integrations",
"name": "S3 Backup Settings",

View file

@ -77,6 +77,9 @@ def take_backups_s3():
def send_email(success, service_name, error_status=None):
if success:
if frappe.db.get_value("S3 Backup Settings", None, "send_email_for_successful_backup") == '0':
return
subject = "Backup Upload Successful"
message = """<h3>Backup Uploaded Successfully! </h3><p>Hi there, this is just to inform you
that your backup was successfully uploaded to your Amazon S3 bucket. So relax!</p> """

View file

@ -634,7 +634,7 @@ frappe.views.ReportView = frappe.ui.BaseList.extend({
data.forEach(function(row, ri) {
$.each(row, function(key, value) {
if (key in field_map) {
totals_row[key] = (totals_row[key] || 0) + value;
totals_row[key] = (totals_row[key] || 0) + (value || 0);
}
});
});