summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-01-14 21:36:35 +0000
committerDouwe Maan <douwe@gitlab.com>2017-01-14 21:36:35 +0000
commit28f633a96a4b16f680dc345aa87fa7aa21c53481 (patch)
tree6c1b233432de758d84e6ed8926fa35ee7d3c8d7c
parent28c23d99c11a347ed9bd23b8778d5aeb44f3bf43 (diff)
parente1521b748bc12f71fa7b8f311fcefb9bd3aca8ae (diff)
downloadgitlab-ce-28f633a96a4b16f680dc345aa87fa7aa21c53481.tar.gz
Merge branch 'bug/project-feature-compatibility' into 'master'
Mutate the attribute instead of issuing a write operation to the DB in `ProjectFeaturesCompatibility` concern. Closes gitlab-ee#1520 See merge request !8552
-rw-r--r--app/models/concerns/project_features_compatibility.rb2
-rw-r--r--changelogs/unreleased/bug-project-feature-compatibility.yml5
2 files changed, 6 insertions, 1 deletions
diff --git a/app/models/concerns/project_features_compatibility.rb b/app/models/concerns/project_features_compatibility.rb
index 6d88951c713..60734bc6660 100644
--- a/app/models/concerns/project_features_compatibility.rb
+++ b/app/models/concerns/project_features_compatibility.rb
@@ -32,6 +32,6 @@ module ProjectFeaturesCompatibility
build_project_feature unless project_feature
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
diff --git a/changelogs/unreleased/bug-project-feature-compatibility.yml b/changelogs/unreleased/bug-project-feature-compatibility.yml
new file mode 100644
index 00000000000..2124ee085e0
--- /dev/null
+++ b/changelogs/unreleased/bug-project-feature-compatibility.yml
@@ -0,0 +1,5 @@
+---
+title: Mutate the attribute instead of issuing a write operation to the DB in `ProjectFeaturesCompatibility`
+ concern.
+merge_request: 8552
+author: