Commit 2550f0c0 authored by Sebastian Ziebell's avatar Sebastian Ziebell
Browse files

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.
parent 7e67cd9303db
......@@ -146,7 +146,7 @@
def saved?
id && valid?
id && persisted?
def import?
......@@ -44,7 +44,7 @@
@project =, attrs).execute
if @project.persisted?
if @project.saved?
present @project, with: Entities::Project
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment