diff --git a/app/models/comment.rb b/app/models/comment.rb index 0c6a5db60..fe134ca2e 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -25,7 +25,7 @@ class Comment < ApplicationRecord private def cleanup_events # Delete events that reference through event_summary - if message&.event_summary.present? + if message.event_summary.present? Event.where(summary: message.event_summary).destroy_all end