Skip to content

Commit

Permalink
Merge pull request #191 from datacite/check_last_checksum
Browse files Browse the repository at this point in the history
Check the last created subset for matching compressed report
  • Loading branch information
richardhallett authored Oct 24, 2024
2 parents cac56fd + 0e03067 commit 976463a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def load_attachment!

# set report.compressed from the attachment.
if compressed_report? || resolution_report?
report_subset = report_subsets.order("created_at ASC").first
report_subset = report_subsets.order("created_at DESC").first
attachment_subset = attachment.search_subsets(checksum: report_subset.checksum)
fail "[UsageReports] cannot find gzip for a report-subset" if attachment_subset.blank?

Expand Down

0 comments on commit 976463a

Please sign in to comment.