From e4789cdfdcc2cebb080c96b5165733043db0ce5e Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Wed, 2 Aug 2017 14:21:31 -0700 Subject: add a comment warning that note.project may be nil --- app/services/notification_recipient_service.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/services/notification_recipient_service.rb b/app/services/notification_recipient_service.rb index 8c7a36d4cb0..0382ecd4abb 100644 --- a/app/services/notification_recipient_service.rb +++ b/app/services/notification_recipient_service.rb @@ -252,6 +252,10 @@ module NotificationRecipientService note.noteable end + # NOTE: may be nil, in the case of a PersonalSnippet + # + # (this is okay because NotificationRecipient is written + # to handle nil projects) def project note.project end -- cgit v1.2.1