summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2017-08-02 14:21:31 -0700
committerhttp://jneen.net/ <jneen@jneen.net>2017-08-03 09:07:18 -0700
commite4789cdfdcc2cebb080c96b5165733043db0ce5e (patch)
tree0022dfc0599f10530de75c274831ab709a879a63
parent273cd9c3c9d94e1d40249073ec23e4eba820f260 (diff)
downloadgitlab-ce-e4789cdfdcc2cebb080c96b5165733043db0ce5e.tar.gz
add a comment warning that note.project may be nil
-rw-r--r--app/services/notification_recipient_service.rb4
1 files changed, 4 insertions, 0 deletions
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