From eed67953892c99f6b26d42a5314d5e0628215c20 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Fri, 10 Nov 2023 15:17:57 -0800 Subject: [PATCH] :gift: add file_id to pending_relationships table --- ...52_add_model_details_to_iiif_print_pending_relationships.rb | 1 + lib/iiif_print/jobs/child_works_from_pdf_job.rb | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/db/migrate/20231110163052_add_model_details_to_iiif_print_pending_relationships.rb b/db/migrate/20231110163052_add_model_details_to_iiif_print_pending_relationships.rb index 2c90bf10..123ef824 100644 --- a/db/migrate/20231110163052_add_model_details_to_iiif_print_pending_relationships.rb +++ b/db/migrate/20231110163052_add_model_details_to_iiif_print_pending_relationships.rb @@ -2,5 +2,6 @@ class AddModelDetailsToIiifPrintPendingRelationships < ActiveRecord::Migration[5 def change add_column :iiif_print_pending_relationships, :parent_model, :string add_column :iiif_print_pending_relationships, :child_model, :string + add_column :iiif_print_pending_relationships, :file_id, :string end end diff --git a/lib/iiif_print/jobs/child_works_from_pdf_job.rb b/lib/iiif_print/jobs/child_works_from_pdf_job.rb index c82b52d1..f8acb11b 100644 --- a/lib/iiif_print/jobs/child_works_from_pdf_job.rb +++ b/lib/iiif_print/jobs/child_works_from_pdf_job.rb @@ -98,7 +98,8 @@ def prepare_import_data(original_pdf_path, image_files, user) parent_id: @parent_work.id, child_order: child_title, parent_model: @parent_work.class, - child_model: @parent_work.iiif_print_config.pdf_split_child_model) + child_model: @parent_work.iiif_print_config.pdf_split_child_model, + file_id: file_id) begin # Clean up the temporary image path.