diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-04-28 13:53:37 +0400 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-04-28 13:55:13 +0400 |
commit | 7339464e7701c0778cca12c12ace83ebd8ffe2f7 (patch) | |
tree | 64bda947686ba7b621c85dee0301b17da8e83f6e /app/finders/notes_finder.rb | |
parent | e5cf5f4f98464543ec2f06415e071b8110368cc7 (diff) |
Fail faster on an invalid target_type
Diffstat (limited to 'app/finders/notes_finder.rb')
-rw-r--r-- | app/finders/notes_finder.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/finders/notes_finder.rb b/app/finders/notes_finder.rb index 384316e14b7..4e80bd81757 100644 --- a/app/finders/notes_finder.rb +++ b/app/finders/notes_finder.rb @@ -12,6 +12,8 @@ class NotesFinder project.merge_requests.find(target_id).mr_and_commit_notes.inc_author.fresh when "snippet" project.snippets.find(target_id).notes.fresh + else + raise 'invalid target_type' end end end |