Fix Compare page throws 500 error when any branch/reference is not selected
This commit is contained in:
parent
6ff989cd6d
commit
5dc8fe31ba
|
@ -25,8 +25,13 @@ class Projects::CompareController < Projects::ApplicationController
|
|||
end
|
||||
|
||||
def create
|
||||
redirect_to namespace_project_compare_path(@project.namespace, @project,
|
||||
if params[:from].blank? || params[:to].blank?
|
||||
flash[:alert] = "You must select from & to branches"
|
||||
redirect_to namespace_project_compare_index_path
|
||||
else
|
||||
redirect_to namespace_project_compare_path(@project.namespace, @project,
|
||||
params[:from], params[:to])
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Fix Compare page throws 500 error when any branch/reference is not selected
|
||||
merge_request: 8492
|
||||
author: Martin Cabrera
|
Loading…
Reference in New Issue