diff options
Diffstat (limited to 'app/services/projects/fork_service.rb')
-rw-r--r-- | app/services/projects/fork_service.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/services/projects/fork_service.rb b/app/services/projects/fork_service.rb index fd9b64a4ee0..3cee1b5975a 100644 --- a/app/services/projects/fork_service.rb +++ b/app/services/projects/fork_service.rb @@ -34,8 +34,9 @@ module Projects new_project = CreateService.new(current_user, new_fork_params).execute return new_project unless new_project.persisted? - builds_access_level = @project.project_feature.builds_access_level - new_project.project_feature.update(builds_access_level: builds_access_level) + new_project.project_feature.update!( + @project.project_feature.slice(ProjectFeature::FEATURES.map { |f| "#{f}_access_level" }) + ) new_project end |