app/models/checksum_audit_log.rb in hyrax-2.1.0 vs app/models/checksum_audit_log.rb in hyrax-2.2.0

- old
+ new

@@ -49,10 +49,10 @@ def self.prune_history(file_set_id, checked_uri:) all_logs = logs_for(file_set_id, checked_uri: checked_uri).reorder("created_at asc").to_a 0.upto(all_logs.length - 2).each do |i| next if all_logs[i].failed? - next if i > 0 && all_logs[i - 1].failed? + next if i.positive? && all_logs[i - 1].failed? next if all_logs[i + 1].failed? all_logs[i].destroy! end end