|  |  | @ -68,7 +68,7 @@ module Submissions | 
			
		
	
		
		
			
				
					
					|  |  |  |                                name: item['name']) |  |  |  |                                name: item['name']) | 
			
		
	
		
		
			
				
					
					|  |  |  |         end |  |  |  |         end | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |       return result_attachments.map { |e| e.tap(&:save!) } if image_pdfs.size < 2 |  |  |  |       return ApplicationRecord.no_touching { result_attachments.map { |e| e.tap(&:save!) } } if image_pdfs.size < 2 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |       images_pdf = |  |  |  |       images_pdf = | 
			
		
	
		
		
			
				
					
					|  |  |  |         image_pdfs.each_with_object(HexaPDF::Document.new) do |pdf, doc| |  |  |  |         image_pdfs.each_with_object(HexaPDF::Document.new) do |pdf, doc| | 
			
		
	
	
		
		
			
				
					|  |  | @ -87,8 +87,10 @@ module Submissions | 
			
		
	
		
		
			
				
					
					|  |  |  |           name: template.name |  |  |  |           name: template.name | 
			
		
	
		
		
			
				
					
					|  |  |  |         ) |  |  |  |         ) | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       ApplicationRecord.no_touching do | 
			
		
	
		
		
			
				
					
					|  |  |  |         (result_attachments + [images_pdf_attachment]).map { |e| e.tap(&:save!) } |  |  |  |         (result_attachments + [images_pdf_attachment]).map { |e| e.tap(&:save!) } | 
			
		
	
		
		
			
				
					
					|  |  |  |       end |  |  |  |       end | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     def generate_pdfs(submitter) |  |  |  |     def generate_pdfs(submitter) | 
			
		
	
		
		
			
				
					
					|  |  |  |       configs = submitter.account.account_configs.where(key: [AccountConfig::FLATTEN_RESULT_PDF_KEY, |  |  |  |       configs = submitter.account.account_configs.where(key: [AccountConfig::FLATTEN_RESULT_PDF_KEY, | 
			
		
	
	
		
		
			
				
					|  |  | 
 |