diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-02-19 16:29:10 -0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-06-05 08:38:09 -0300 |
commit | 5a89bcc4dae55c40bdd926797aba5e3f0ada05ae (patch) | |
tree | e64a364634faf196a3c59d40b50c437761d513d0 /app/models | |
parent | d9a761ed14ab5025626dee17faf1528c1264a1b0 (diff) | |
download | gitlab-ce-5a89bcc4dae55c40bdd926797aba5e3f0ada05ae.tar.gz |
Avoid 500's when commit is not reachable
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/diff_note.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/diff_note.rb b/app/models/diff_note.rb index 1a87fc47c56..8221b7de2b6 100644 --- a/app/models/diff_note.rb +++ b/app/models/diff_note.rb @@ -77,7 +77,7 @@ class DiffNote < Note end def supports_suggestion? - return false unless noteable.supports_suggestion? && on_text? + return false unless noteable&.supports_suggestion? && on_text? # We don't want to trigger side-effects of `diff_file` call. return false unless file = latest_diff_file return false unless line = file.line_for_position(self.position) |