瀏覽代碼

Merge pull request #2254 from shreyasp/def-backup-limit

[Fix] Set default backup limit for sites which are not set
version-14
Nabin Hait 8 年之前
committed by GitHub
父節點
當前提交
e8a4077de6
共有 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)

Loading…
取消
儲存