diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-11-05 15:32:41 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-11-05 15:32:41 +0200 |
commit | 7e0128f7e1f44d766effed824fea88874d00e45a (patch) | |
tree | 9cb72b8d66b6a53c15c3d7f4fb7452c5bd36ce8c /app/models/commit.rb | |
parent | f17c4950fa5a951102d5592dc962f20e302b44aa (diff) | |
download | gitlab-ci-7e0128f7e1f44d766effed824fea88874d00e45a.tar.gz |
Fix tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 6817101..184d3a0 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -57,7 +57,7 @@ class Commit < ActiveRecord::Base end def git_commit_message - commit_data[:message] if commit_data + commit_data[:message] if commit_data && commit_data[:message] end def short_before_sha @@ -69,8 +69,8 @@ class Commit < ActiveRecord::Base end def commit_data - push_data[:commits].each do |commit| - return commit if commit[:id] == sha + push_data[:commits].find do |commit| + commit[:id] == sha end rescue nil |