From 02b0c37cabf0456a4c36680fb1313b1107f35f54 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Fri, 18 Mar 2016 13:27:27 -0300 Subject: Refactor `Todo#target` --- app/models/todo.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'app/models/todo.rb') diff --git a/app/models/todo.rb b/app/models/todo.rb index ab804d712a0..d85f7bfdf57 100644 --- a/app/models/todo.rb +++ b/app/models/todo.rb @@ -61,14 +61,10 @@ class Todo < ActiveRecord::Base # override to return commits, which are not active record def target if for_commit? - project.commit(commit_id) + project.commit(commit_id) rescue nil else super end - # Temp fix to prevent app crash - # if note commit id doesn't exist - rescue - nil end def target_reference -- cgit v1.2.1