Commit 7e45ba700415a180998cee5eb36158727be5f051
1 parent
1a01fc0c
Exists in
master
and in
4 other branches
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.
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/api/projects.rb
... | ... | @@ -44,7 +44,7 @@ module Gitlab |
44 | 44 | :merge_requests_enabled, |
45 | 45 | :wiki_enabled] |
46 | 46 | @project = ::Projects::CreateContext.new(current_user, attrs).execute |
47 | - if @project.saved? | |
47 | + if @project.persisted? | |
48 | 48 | present @project, with: Entities::Project |
49 | 49 | else |
50 | 50 | not_found! | ... | ... |