浏览代码

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

version-14
shreyas 8 年前
父节点
当前提交
7340aceddb
共有 2 个文件被更改,包括 10 次插入0 次删除
  1. +1
    -0
      frappe/patches.txt
  2. +9
    -0
      frappe/patches/v7_1/set_backup_limit.py

+ 1
- 0
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

+ 9
- 0
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)

正在加载...
取消
保存