fix app crash if author is missing

This commit is contained in:
Dmitriy Zaporozhets 2013-02-01 09:33:12 +02:00
parent cc2484c3e6
commit 61833bcb74
1 changed files with 3 additions and 1 deletions

View File

@ -11,7 +11,9 @@ class NoteObserver < ActiveRecord::Observer
notify_team(note)
elsif note.notify_author
# Notify only author of resource
Notify.delay.note_commit_email(note.commit_author.id, note.id)
if note.commit_author
Notify.delay.note_commit_email(note.commit_author.id, note.id)
end
else
# Otherwise ignore it
nil