fix result generation on missing page

This commit is contained in:
Pete Matsyburka
2023-12-11 18:28:24 +02:00
parent 8a1b71688c
commit f1e0d5d137
@@ -39,7 +39,12 @@ module Submissions
field.fetch('areas', []).each do |area|
pdf = pdfs_index[area['attachment_uuid']]
next if pdf.nil?
page = pdf.pages[area['page']]
next if page.nil?
page.rotate(0, flatten: true) if page[:Rotate] != 0
page[:Annots] ||= []