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
eb6bba66
Commit
eb6bba66
authored
Jul 25, 2017
by
Tiago Botelho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes 500 error caused by pending delete projects in admin dashboard
parent
248ddf26
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
app/controllers/admin/dashboard_controller.rb
app/controllers/admin/dashboard_controller.rb
+1
-1
changelogs/unreleased/35453-pending-delete-projects-error-in-admin-dashboard-fix.yml
...-pending-delete-projects-error-in-admin-dashboard-fix.yml
+4
-0
spec/controllers/admin/dashboard_controller_spec.rb
spec/controllers/admin/dashboard_controller_spec.rb
+16
-0
No files found.
app/controllers/admin/dashboard_controller.rb
View file @
eb6bba66
class
Admin::DashboardController
<
Admin
::
ApplicationController
def
index
@projects
=
Project
.
with_route
.
limit
(
10
)
@projects
=
Project
.
with
out_deleted
.
with
_route
.
limit
(
10
)
@users
=
User
.
limit
(
10
)
@groups
=
Group
.
with_route
.
limit
(
10
)
@license
=
License
.
current
...
...
changelogs/unreleased/35453-pending-delete-projects-error-in-admin-dashboard-fix.yml
0 → 100644
View file @
eb6bba66
---
title
:
Fixes 500 error caused by pending delete projects in admin dashboard
merge_request
:
13067
author
:
spec/controllers/admin/dashboard_controller_spec.rb
View file @
eb6bba66
...
...
@@ -22,5 +22,21 @@ describe Admin::DashboardController do
expect
(
response
).
to
have_http_status
(
404
)
end
context
'with pending_delete projects'
do
render_views
it
'does not retrieve projects that are pending deletion'
do
sign_in
(
create
(
:admin
))
project
=
create
(
:project
)
pending_delete_project
=
create
(
:project
,
pending_delete:
true
)
get
:index
expect
(
response
.
body
).
to
match
(
project
.
name
)
expect
(
response
.
body
).
not_to
match
(
pending_delete_project
.
name
)
end
end
end
end
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