diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-06-05 16:56:29 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-06-06 16:00:28 +0300 |
commit | e6568d806d85b74c75fc37f1afc7c01c139818ba (patch) | |
tree | 38f638596bc27df2dc5c59817d91f410d72ca09a /app/services/projects/create_service.rb | |
parent | 96747556e70470caed4175730f9342af2f0f593d (diff) |
Don't update/create projects errors were added
This could be done when a block is passed in EE.
Diffstat (limited to 'app/services/projects/create_service.rb')
-rw-r--r-- | app/services/projects/create_service.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/services/projects/create_service.rb b/app/services/projects/create_service.rb index d4a5b979f63..a02a9052fb2 100644 --- a/app/services/projects/create_service.rb +++ b/app/services/projects/create_service.rb @@ -46,6 +46,9 @@ module Projects yield(@project) if block_given? + # If the block added errors, don't try to save the project + return @project if @project.errors.any? + @project.creator = current_user if forked_from_project_id |