aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlban Peignier2018-04-25 21:12:18 +0200
committerAlban Peignier2018-04-25 21:12:18 +0200
commit01b34863fce398ffa7bbc2841f8acca78f217e06 (patch)
treed960a15e79ba99a89b21234496d7175f1602e503
parent7ccff199edb73a277ee15ac95d36f6b50df896fb (diff)
downloadchouette-core-01b34863fce398ffa7bbc2841f8acca78f217e06.tar.bz2
Ignore nil/unfound parent in ChecksumSupport. Refs #6711
-rw-r--r--app/models/concerns/checksum_support.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/checksum_support.rb b/app/models/concerns/checksum_support.rb
index 696844fbd..ed33e8f92 100644
--- a/app/models/concerns/checksum_support.rb
+++ b/app/models/concerns/checksum_support.rb
@@ -21,7 +21,7 @@ module ChecksumSupport
parents << self.send(belongs_to) if klass.reflections[belongs_to].present?
parents += self.send(has_many) if klass.reflections[has_many].present?
Rails.logger.debug "Request from #{klass.name} checksum updates for #{parents.count} #{parent_class} parent(s)"
- parents.each &:update_checksum_without_callbacks!
+ parents.compact.each &:update_checksum_without_callbacks!
end
end
end