Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-03-18 19:27:27 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-03-18 19:27:27 +0300
commit02b0c37cabf0456a4c36680fb1313b1107f35f54 (patch)
treee112e567c618bd8011038ba79f4a241f7117f67d /app/models/todo.rb
parent2a8858ca8adbc54d7e24e698fa8ce370a1e91157 (diff)
Refactor `Todo#target`
Diffstat (limited to 'app/models/todo.rb')
-rw-r--r--app/models/todo.rb6
1 files changed, 1 insertions, 5 deletions
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