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.
This commit is contained in:
parent
1a01fc0c96
commit
7e45ba7004
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ module Gitlab
|
|||
:merge_requests_enabled,
|
||||
:wiki_enabled]
|
||||
@project = ::Projects::CreateContext.new(current_user, attrs).execute
|
||||
if @project.saved?
|
||||
if @project.persisted?
|
||||
present @project, with: Entities::Project
|
||||
else
|
||||
not_found!
|
||||
|
|
Loading…
Reference in a new issue