Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5dc8fe31
Commit
5dc8fe31
authored
Jan 10, 2017
by
Martin Cabrera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Compare page throws 500 error when any branch/reference is not selected
parent
6ff989cd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
app/controllers/projects/compare_controller.rb
app/controllers/projects/compare_controller.rb
+6
-1
changelogs/unreleased/i--25814-500-error.yml
changelogs/unreleased/i--25814-500-error.yml
+4
-0
No files found.
app/controllers/projects/compare_controller.rb
View file @
5dc8fe31
...
@@ -25,9 +25,14 @@ class Projects::CompareController < Projects::ApplicationController
...
@@ -25,9 +25,14 @@ class Projects::CompareController < Projects::ApplicationController
end
end
def
create
def
create
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
,
redirect_to
namespace_project_compare_path
(
@project
.
namespace
,
@project
,
params
[
:from
],
params
[
:to
])
params
[
:from
],
params
[
:to
])
end
end
end
private
private
...
...
changelogs/unreleased/i--25814-500-error.yml
0 → 100644
View file @
5dc8fe31
---
title
:
Fix Compare page throws 500 error when any branch/reference is not selected
merge_request
:
8492
author
:
Martin Cabrera
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment