From 306af63b8d78815cae353bf2b1191e10c44a7cd0 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 2 Aug 2022 15:51:14 +0530 Subject: [PATCH] fix: max_positive_value for Integer types (#17712) (#17714) * fix: max_positive_value for Integer types * style: formatting Co-authored-by: Ankush Menat (cherry picked from commit d88d9f51865cdfe7cbf0a8c906862e7caa64fd08) Co-authored-by: Sagar Sharma --- frappe/model/base_document.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/model/base_document.py b/frappe/model/base_document.py index 0207571e14..1162ceacd3 100644 --- a/frappe/model/base_document.py +++ b/frappe/model/base_document.py @@ -20,7 +20,7 @@ from frappe.modules import load_doctype_module from frappe.utils import cast_fieldtype, cint, cstr, flt, now, sanitize_html, strip_html from frappe.utils.html_utils import unescape_html -max_positive_value = {"smallint": 2**15, "int": 2**31, "bigint": 2**63} +max_positive_value = {"smallint": 2**15 - 1, "int": 2**31 - 1, "bigint": 2**63 - 1} DOCTYPE_TABLE_FIELDS = [ _dict(fieldname="fields", options="DocField"),