diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-10-04 12:30:57 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-10-04 14:43:58 +0200 |
commit | 5ce5abdc1dc53e97cff88f5abfe0edd10211bf9c (patch) | |
tree | 85c42bfb3b44f4291ed7308bcb4c2c5f7259c439 /app | |
parent | f57cfdb6b527fe20f64f8a76339264948c3b358b (diff) | |
download | gitlab-ce-5ce5abdc1dc53e97cff88f5abfe0edd10211bf9c.tar.gz |
Fix hipchat service specs after changes in pipeline
Diffstat (limited to 'app')
-rw-r--r-- | app/models/commit_status.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index 9c4f86144d8..4bb4211dfe3 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -70,9 +70,8 @@ class CommitStatus < ActiveRecord::Base end after_transition do |commit_status, transition| - commit_status.pipeline.tap do |pipeline| - return if transition.loopback? - return unless pipeline + commit_status.pipeline.try do |pipeline| + return false if transition.loopback? if commit_status.complete? ProcessPipelineWorker.perform_async(pipeline.id) |