diff options
author | Sebastian Ziebell <sebastian.ziebell@asquera.de> | 2013-02-14 12:58:33 +0100 |
---|---|---|
committer | Sebastian Ziebell <sebastian.ziebell@asquera.de> | 2013-02-14 12:58:33 +0100 |
commit | 3025824415184c16f86bb67276474113de48d813 (patch) | |
tree | 2c22c8d50f079e40124942781d29ca9211a3e79e /lib/api | |
parent | 7e45ba700415a180998cee5eb36158727be5f051 (diff) | |
download | gitlab-ce-3025824415184c16f86bb67276474113de48d813.tar.gz |
API: refactored last fix, project limit in web client is fixed too
The previous call `saved?` is restored in the `POST /projects` method in the API.
It is refactored to check if the record is persisted. This is useful to not validate
the record again after saving. This fixes the returned status code in the web client
too. If the last project is created via web client instead of error notification
the project page is shown.
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/projects.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb index e0c1e338290..d416121a78a 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.persisted? + if @project.saved? present @project, with: Entities::Project else not_found! |