From deb75cb07e18dc832ea04d7b3f402eb79565578f Mon Sep 17 00:00:00 2001 From: Maharshi Patel Date: Wed, 18 Oct 2023 13:07:18 +0530 Subject: [PATCH] fix(minor): set is_private as int instead of bool --- frappe/core/doctype/file/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/core/doctype/file/utils.py b/frappe/core/doctype/file/utils.py index a1c90b2ee6..3bb69e72ac 100644 --- a/frappe/core/doctype/file/utils.py +++ b/frappe/core/doctype/file/utils.py @@ -13,7 +13,7 @@ from PIL import Image import frappe from frappe import _, safe_decode -from frappe.utils import cstr, encode, get_files_path, random_string, strip +from frappe.utils import cint, cstr, encode, get_files_path, random_string, strip from frappe.utils.file_manager import safe_b64decode from frappe.utils.image import optimize_image @@ -339,7 +339,7 @@ def attach_files_to_document(doc: "Document", event) -> None: "attached_to_name": doc.name, "attached_to_doctype": doc.doctype, "attached_to_field": df.fieldname, - "is_private": value.startswith("/private"), + "is_private": cint(value.startswith("/private")), }, ) continue