From 35bb2bd012a7734559998e2bdcb4c57b30953fc9 Mon Sep 17 00:00:00 2001 From: Maharshi Patel Date: Tue, 2 Apr 2024 23:52:28 +0530 Subject: [PATCH] chore: defer image import until fw pr is merged revert this after https://github.com/frappe/frappe/pull/25779 is released in v15 --- print_designer/default_formats.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/print_designer/default_formats.py b/print_designer/default_formats.py index f0fbc6a..8cc8bd7 100644 --- a/print_designer/default_formats.py +++ b/print_designer/default_formats.py @@ -65,16 +65,16 @@ def install_default_formats(app, filter_by="", load_pd_formats=True): app=app, templates_folder=pd_folder[0], filter_by=filter_by ) - preview_files = [f for f in print_formats if f.name.endswith("-preview.json")] + # preview_files = [f for f in print_formats if f.name.endswith("-preview.json")] print_formats = [f for f in print_formats if not f.name.endswith("-preview.json")] for json_file_path in print_formats: import_file_by_path(path=json_file_path) frappe.db.commit() - - for json_file_path in preview_files: - import_file_by_path(path=json_file_path, pre_process=update_preview_img) - frappe.db.commit() + # TODO: enable this after this is released in v15 https://github.com/frappe/frappe/pull/25779 + # for json_file_path in preview_files: + # import_file_by_path(path=json_file_path, pre_process=update_preview_img) + # frappe.db.commit() for pf in frappe.db.get_all("Print Format", filters={"standard": "Yes", "print_designer": 1}): updated_url = frappe.db.get_value(