Commit 61833bcb7457d98800c0581b6d09406929057a54
1 parent
cc2484c3
Exists in
master
and in
4 other branches
fix app crash if author is missing
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
app/observers/note_observer.rb
@@ -11,7 +11,9 @@ class NoteObserver < ActiveRecord::Observer | @@ -11,7 +11,9 @@ class NoteObserver < ActiveRecord::Observer | ||
11 | notify_team(note) | 11 | notify_team(note) |
12 | elsif note.notify_author | 12 | elsif note.notify_author |
13 | # Notify only author of resource | 13 | # Notify only author of resource |
14 | - Notify.delay.note_commit_email(note.commit_author.id, note.id) | 14 | + if note.commit_author |
15 | + Notify.delay.note_commit_email(note.commit_author.id, note.id) | ||
16 | + end | ||
15 | else | 17 | else |
16 | # Otherwise ignore it | 18 | # Otherwise ignore it |
17 | nil | 19 | nil |