Skip to content

Commit

Permalink
chore: defer image import until fw pr is merged
Browse files Browse the repository at this point in the history
revert this after frappe/frappe#25779 is released in v15
  • Loading branch information
maharshivpatel committed Apr 2, 2024
1 parent 7c31f7d commit 35bb2bd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions print_designer/default_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 35bb2bd

Please sign in to comment.