Skip to content

Commit

Permalink
add check before N+1 notification publish to prevent poly association…
Browse files Browse the repository at this point in the history
… with nil type to be include
  • Loading branch information
wendy-clio committed Jun 5, 2024
1 parent 41abfe4 commit ad5d31e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def load_target
end
end
end

private def not_a_polymorphic_association_with_missing_type
!(self.is_a?(ActiveRecord::Associations::BelongsToPolymorphicAssociation) && self.klass.nil?)
end
Expand Down

0 comments on commit ad5d31e

Please sign in to comment.