diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-27 21:20:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-27 21:20:35 +0300 |
commit | fbcf5b688d3133065705b24b73330f9b9bf19181 (patch) | |
tree | 5d640c9c862feaa1ad3399fb8277c32ff70834e3 /app/services/packages | |
parent | e8aa488899554f5fe4413779f485583d691fd5a8 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/packages')
-rw-r--r-- | app/services/packages/npm/create_package_service.rb | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/app/services/packages/npm/create_package_service.rb b/app/services/packages/npm/create_package_service.rb index b5a0a22a24e..aa535fc7775 100644 --- a/app/services/packages/npm/create_package_service.rb +++ b/app/services/packages/npm/create_package_service.rb @@ -13,17 +13,13 @@ module Packages return error('Package already exists.', 403) if current_package_exists? return error('File is too large.', 400) if file_size_exceeded? - if Feature.enabled?(:npm_obtain_lease_to_create_package, project) - package = try_obtain_lease do - ApplicationRecord.transaction { create_npm_package! } - end - - return error('Could not obtain package lease.', 400) unless package - - package - else + package = try_obtain_lease do ApplicationRecord.transaction { create_npm_package! } end + + return error('Could not obtain package lease.', 400) unless package + + package end private |