check if an organization is present when creating a reaction (#5264) [deploy]

This commit is contained in:
Molly Struve 2019-12-27 13:12:12 -06:00 committed by GitHub
parent 11689929ef
commit c9fea65ed8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -78,6 +78,6 @@ class ReactionsController < ApplicationController
private
def organization_article?(reaction)
reaction.reactable_type == "Article" && reaction.reactable.organization_id
reaction.reactable_type == "Article" && reaction.reactable.organization.present?
end
end