Commit de029359 authored by Gary Holtz's avatar Gary Holtz

Fixes a potential error state

If `MergeWorker` is run twice, this could show a "Merge Request is not
mergeable" error.
parent ab3578fb
...@@ -55,8 +55,6 @@ module MergeRequests ...@@ -55,8 +55,6 @@ module MergeRequests
error = error =
if @merge_request.should_be_rebased? if @merge_request.should_be_rebased?
'Only fast-forward merge is allowed for your project. Please update your source branch' 'Only fast-forward merge is allowed for your project. Please update your source branch'
elsif !@merge_request.merged? && !@merge_request.mergeable?
'Merge request is not mergeable'
end end
raise_error(error) if error raise_error(error) if error
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment