diff options
-rw-r--r-- | app/models/concerns/project_features_compatibility.rb | 2 | ||||
-rw-r--r-- | changelogs/unreleased/bug-project-feature-compatibility.yml | 5 |
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: |