Skip to content
Snippets Groups Projects
Commit 7e45ba70 authored by Sebastian Ziebell's avatar Sebastian Ziebell
Browse files

API: fixes return code when creating last project before reaching limit

When creating the last project via API when reaching the project limit a status code
of 404 (Not found) is returned instead of 201 (Created). The fix checks now correctly if
the project could be saved.
parent 1a01fc0c
No related branches found
No related tags found
No related merge requests found
Loading
@@ -44,7 +44,7 @@ module Gitlab
Loading
@@ -44,7 +44,7 @@ module Gitlab
:merge_requests_enabled, :merge_requests_enabled,
:wiki_enabled] :wiki_enabled]
@project = ::Projects::CreateContext.new(current_user, attrs).execute @project = ::Projects::CreateContext.new(current_user, attrs).execute
if @project.saved? if @project.persisted?
present @project, with: Entities::Project present @project, with: Entities::Project
else else
not_found! not_found!
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment