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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
e1521b74
Commit
e1521b74
authored
Jan 12, 2017
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mutate the attribute instead of issuing a write operation to the DB
This fixes gitlab-org/gitlab-ee#1520
parent
e75b1f11
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
app/models/concerns/project_features_compatibility.rb
app/models/concerns/project_features_compatibility.rb
+1
-1
changelogs/unreleased/bug-project-feature-compatibility.yml
changelogs/unreleased/bug-project-feature-compatibility.yml
+5
-0
No files found.
app/models/concerns/project_features_compatibility.rb
View file @
e1521b74
...
@@ -32,6 +32,6 @@ module ProjectFeaturesCompatibility
...
@@ -32,6 +32,6 @@ module ProjectFeaturesCompatibility
build_project_feature
unless
project_feature
build_project_feature
unless
project_feature
access_level
=
Gitlab
::
Utils
.
to_boolean
(
value
)
?
ProjectFeature
::
ENABLED
:
ProjectFeature
::
DISABLED
access_level
=
Gitlab
::
Utils
.
to_boolean
(
value
)
?
ProjectFeature
::
ENABLED
:
ProjectFeature
::
DISABLED
project_feature
.
update_attribute
(
field
,
access_level
)
project_feature
.
send
(
:write_attribute
,
field
,
access_level
)
end
end
end
end
changelogs/unreleased/bug-project-feature-compatibility.yml
0 → 100644
View file @
e1521b74
---
title
:
Mutate the attribute instead of issuing a write operation to the DB in `ProjectFeaturesCompatibility`
concern.
merge_request
:
8552
author
:
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