add a comment warning that note.project may be nil

This commit is contained in:
http://jneen.net/ 2017-08-02 14:21:31 -07:00
parent 273cd9c3c9
commit e4789cdfdc

View file

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