From 381ee5682c8c87b5565d721b89dd7b555c8d15f7 Mon Sep 17 00:00:00 2001 From: Hicham Dachir Date: Mon, 10 Mar 2025 07:44:25 +0100 Subject: [PATCH] fix: add newline to JSON exports Add empty line in the end of auto generate/update doctype files, in order to follow the python code style --- frappe/modules/export_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/modules/export_file.py b/frappe/modules/export_file.py index aad956c0c2..8686f68cc9 100644 --- a/frappe/modules/export_file.py +++ b/frappe/modules/export_file.py @@ -54,7 +54,7 @@ def write_document_file(doc, record_module=None, create_init=True, folder_name=N if is_custom_module and not Path(path).resolve().is_relative_to(Path(frappe.get_site_path()).resolve()): frappe.throw("Invalid export path: " + Path(path).as_posix()) with open(path, "w+") as txtfile: - txtfile.write(frappe.as_json(doc_export)) + txtfile.write(frappe.as_json(doc_export) + "\n") print(f"Wrote document file for {doc.doctype} {doc.name} at {path}")