diff --git a/app/models/comment.rb b/app/models/comment.rb index 70a36562f..ec916ccc3 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -25,7 +25,7 @@ class Comment < ApplicationRecord private def card_is_commentable - errors.add(:card, "does not allow comments") unless card.commentable? + errors.add(:card, "does not allow comments") unless card&.commentable? end def watch_card_by_creator