diff --git a/frappe/patches.txt b/frappe/patches.txt index b0883bbebe..5b46911f0b 100644 --- a/frappe/patches.txt +++ b/frappe/patches.txt @@ -144,3 +144,4 @@ execute:frappe.db.set_value("Print Settings", "Print Settings", "add_draft_headi frappe.patches.v7_0.cleanup_list_settings execute:frappe.db.set_default('language', '') frappe.patches.v7_1.refactor_integration_broker +frappe.patches.v7_1.set_backup_limit diff --git a/frappe/patches/v7_1/set_backup_limit.py b/frappe/patches/v7_1/set_backup_limit.py new file mode 100644 index 0000000000..f32c35ce0c --- /dev/null +++ b/frappe/patches/v7_1/set_backup_limit.py @@ -0,0 +1,9 @@ +from __future__ import unicode_literals +from frappe.utils import cint +import frappe + +def execute(): + backup_limit = frappe.db.get_single_value('System Settings', 'backup_limit') + + if cint(backup_limit) == 0: + frappe.db.set_value('System Settings', 'System Settings', 'backup_limit', 3)