Add missing safe navigation operator

This commit is contained in:
Vinoth Kannan 2018-12-05 16:23:43 +05:30
parent d33d031742
commit fb78414229
1 changed files with 2 additions and 2 deletions

View File

@ -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