From fb784142298ea3f9a5c2d1da4863aca2ef167f0e Mon Sep 17 00:00:00 2001 From: Vinoth Kannan Date: Wed, 5 Dec 2018 16:23:43 +0530 Subject: [PATCH] Add missing safe navigation operator --- app/models/web_hook.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/web_hook.rb b/app/models/web_hook.rb index b72a3b7a0dd..dc8a21da327 100644 --- a/app/models/web_hook.rb +++ b/app/models/web_hook.rb @@ -73,7 +73,7 @@ class WebHook < ActiveRecord::Base WebHook.enqueue_hooks(:topic, event, id: topic.id, category_id: topic&.category_id, - tag_ids: topic&.tags.pluck(:id), + tag_ids: topic&.tags&.pluck(:id), payload: payload ) end @@ -86,7 +86,7 @@ class WebHook < ActiveRecord::Base WebHook.enqueue_hooks(:post, event, id: post.id, category_id: post&.topic&.category_id, - tag_ids: post&.topic&.tags.pluck(:id), + tag_ids: post&.topic&.tags&.pluck(:id), payload: payload ) end