[Fix] Set default backup limit for sites which are not set

This commit is contained in:
shreyas 2016-11-03 16:11:23 +05:30
parent 706d6fd698
commit 7340aceddb
2 changed files with 10 additions and 0 deletions

View file

@ -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

View file

@ -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)