diff options
Diffstat (limited to 'app/services/projects/create_service.rb')
-rw-r--r-- | app/services/projects/create_service.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/app/services/projects/create_service.rb b/app/services/projects/create_service.rb index a6820183bee..501e58c1407 100644 --- a/app/services/projects/create_service.rb +++ b/app/services/projects/create_service.rb @@ -9,10 +9,8 @@ module Projects @project = Project.new(params) - # Make sure that the user is allowed to use the specified visibility - # level - unless Gitlab::VisibilityLevel.allowed_for?(current_user, - params[:visibility_level]) + # Make sure that the user is allowed to use the specified visibility level + unless Gitlab::VisibilityLevel.allowed_for?(current_user, params[:visibility_level]) deny_visibility_level(@project) return @project end @@ -55,9 +53,7 @@ module Projects @project.save if @project.persisted? && !@project.import? - unless @project.create_repository - raise 'Failed to create repository' - end + raise 'Failed to create repository' unless @project.create_repository end end |