diff options
author | Felipe Artur <felipefac@gmail.com> | 2017-05-05 22:00:18 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2017-05-09 00:43:53 +0300 |
commit | 2ccee7161a58ea04c66b216ccb57e522850f5d95 (patch) | |
tree | 5af6abd2d2e42c59387423f3506cf064c7dc14dd /app | |
parent | d9bebd89dfcf7e4b163b271eea3d7a5c3e99fb5d (diff) |
Small code improvements and add migration spec
Diffstat (limited to 'app')
-rw-r--r-- | app/services/ci/create_pipeline_service.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/services/ci/create_pipeline_service.rb b/app/services/ci/create_pipeline_service.rb index 26b744ae3c4..1f6c1f4a7f6 100644 --- a/app/services/ci/create_pipeline_service.rb +++ b/app/services/ci/create_pipeline_service.rb @@ -119,9 +119,8 @@ module Ci end def update_merge_requests_head_pipeline - merge_requests = MergeRequest.where(source_branch: @pipeline.ref, source_project: @pipeline.project) - - merge_requests.update_all(head_pipeline_id: @pipeline.id) if merge_requests.any? + MergeRequest.where(source_branch: @pipeline.ref, source_project: @pipeline.project). + update_all(head_pipeline_id: @pipeline.id) end def error(message, save: false) |