mirror of
https://github.com/docusealco/docuseal
synced 2026-11-07 15:22:33 -05:00
fix document metadata
This commit is contained in:
1 parent
4190544edc
commit
ce9ab691ec
1 file changed
+2
-2
@@ -17,12 +17,12 @@ class SubmitFormMetadataController < ApplicationController
|
|||||||
submission.schema_documents.find { |a| a.uuid == item['attachment_uuid'] }
|
submission.schema_documents.find { |a| a.uuid == item['attachment_uuid'] }
|
||||||
end
|
end
|
||||||
|
|
||||||
ActiveRecord::Associations::Preloader.new(records: documents, associations: %i[blob record]).call
|
ActiveRecord::Associations::Preloader.new(records: documents, associations: :blob).call
|
||||||
|
|
||||||
text_runs = documents.to_h do |document|
|
text_runs = documents.to_h do |document|
|
||||||
[
|
[
|
||||||
document.uuid,
|
document.uuid,
|
||||||
DocumentMetadatas.find_or_create_for_document(document, account_id: document.record.account_id).text_runs
|
DocumentMetadatas.find_or_create_for_document(document, account_id: submission.account_id).text_runs
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user