Commit 61833bcb authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

fix app crash if author is missing

parent cc2484c3
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment