BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
c29c0b30
Commit
c29c0b30
authored
Mar 08, 2018
by
James Lopez
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'sh-fix-update-service' into 'master'
Fix Error 500 when updating a project Closes #44019 See merge request gitlab-org/gitlab-ce!17647
parents
ac1f3bc3
9c8e9046
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
update_service.rb
app/services/projects/update_service.rb
+1
-1
update_service_spec.rb
spec/services/projects/update_service_spec.rb
+9
-0
No files found.
app/services/projects/update_service.rb
View file @
c29c0b30
...
...
@@ -58,7 +58,7 @@ module Projects
def
enabling_wiki?
return
false
if
@project
.
wiki_enabled?
params
[
:project_feature_attributes
][
:wiki_access_level
]
.
to_i
>
ProjectFeature
::
DISABLED
params
.
dig
(
:project_feature_attributes
,
:wiki_access_level
)
.
to_i
>
ProjectFeature
::
DISABLED
end
def
ensure_wiki_exists
...
...
spec/services/projects/update_service_spec.rb
View file @
c29c0b30
...
...
@@ -132,6 +132,15 @@ describe Projects::UpdateService do
expect
(
result
).
to
eq
({
status: :success
})
expect
(
project
.
wiki_repository_exists?
).
to
be
false
end
it
'handles empty project feature attributes'
do
project
.
project_feature
.
update
(
wiki_access_level:
ProjectFeature
::
DISABLED
)
result
=
update_project
(
project
,
user
,
{
name:
'test1'
})
expect
(
result
).
to
eq
({
status: :success
})
expect
(
project
.
wiki_repository_exists?
).
to
be
false
end
end
context
'when enabling a wiki'
do
...
...
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