Commit b72f22ee authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #8495 from dblessing/fix_8432

Merge request error display
parents c4700725 aacf0746
......@@ -13,7 +13,7 @@ module MergeRequests
merge_request.target_branch ||= merge_request.target_project.default_branch
unless merge_request.target_branch && merge_request.source_branch
return build_failed(merge_request, "You must select source and target branches")
return build_failed(merge_request, nil)
end
# Generate suggested MR title based on source branch name
......@@ -59,7 +59,7 @@ module MergeRequests
end
def build_failed(merge_request, message)
merge_request.errors.add(:base, message)
merge_request.errors.add(:base, message) unless message.nil?
merge_request.compare_commits = []
merge_request.can_be_created = false
merge_request
......
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