summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
diff options
context:
space:
mode:
authorSebastian Ziebell <sebastian.ziebell@asquera.de>2013-02-14 11:14:52 +0100
committerSebastian Ziebell <sebastian.ziebell@asquera.de>2013-02-14 11:14:52 +0100
commit7e45ba700415a180998cee5eb36158727be5f051 (patch)
treeff7247bf3098ca0d4c62d16251aa94800939cd90 /lib/api/projects.rb
parent1a01fc0c964defe60c9dc99fa2b5fa0387f3246a (diff)
downloadgitlab-ce-7e45ba700415a180998cee5eb36158727be5f051.tar.gz
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.
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r--lib/api/projects.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index d416121a78a..e0c1e338290 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -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!