From e1521b748bc12f71fa7b8f311fcefb9bd3aca8ae Mon Sep 17 00:00:00 2001 From: Gabriel Mazetto Date: Thu, 12 Jan 2017 18:27:06 -0500 Subject: Mutate the attribute instead of issuing a write operation to the DB This fixes gitlab-org/gitlab-ee#1520 --- app/models/concerns/project_features_compatibility.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/concerns/project_features_compatibility.rb') 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 -- cgit v1.2.3