From 7340aceddb963a8b911162c08097f76b6eb1ef84 Mon Sep 17 00:00:00 2001 From: shreyas Date: Thu, 3 Nov 2016 16:11:23 +0530 Subject: [PATCH 1/3] [Fix] Set default backup limit for sites which are not set --- frappe/patches.txt | 1 + frappe/patches/v7_1/set_backup_limit.py | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 frappe/patches/v7_1/set_backup_limit.py 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) From 7cfe6c5ff6677b17fddd7c008e1e2788fcbab711 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 4 Nov 2016 13:32:58 +0530 Subject: [PATCH 2/3] [fix] Don't remove last columns if empty (#2256) --- frappe/www/print.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/frappe/www/print.py b/frappe/www/print.py index 0989b28a77..b951ae4f24 100644 --- a/frappe/www/print.py +++ b/frappe/www/print.py @@ -250,9 +250,6 @@ def make_layout(doc, meta, format_data=None): if page[-1]['has_data']==False: # truncate last section if empty del page[-1] - elif page[-1]['columns'][-1]['fields']==[]: - # truncate last column in empty - del page[-1]['columns'][-1] section = get_new_section() if df.fieldtype=='Section Break' and df.label: From 1e0f19140899f7802e1425cc85197391c9b01e0b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 4 Nov 2016 17:22:13 +0600 Subject: [PATCH 3/3] bumped to version 7.1.6 --- frappe/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/__init__.py b/frappe/__init__.py index 69cfb3ec4f..1e01423841 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -13,7 +13,7 @@ import os, sys, importlib, inspect, json from .exceptions import * from .utils.jinja import get_jenv, get_template, render_template -__version__ = '7.1.5' +__version__ = '7.1.6' __title__ = "Frappe Framework" local = Local()