Merge pull request #2254 from shreyasp/def-backup-limit
[Fix] Set default backup limit for sites which are not set
This commit is contained in:
commit
e8a4077de6
2 changed files with 10 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
9
frappe/patches/v7_1/set_backup_limit.py
Normal file
9
frappe/patches/v7_1/set_backup_limit.py
Normal 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)
|
||||
Loading…
Add table
Reference in a new issue