Fix crash on commentable check

This commit is contained in:
Stanko K.R.
2026-02-02 12:51:46 +01:00
parent 58a14fb1f5
commit ccbf571be4
+1 -1
View File
@@ -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