Commit 9b8cd879 authored by James Lopez's avatar James Lopez
Browse files

fix branch complexity

parent ea9425b5043d
......@@ -57,11 +57,7 @@ def execute
after_create_actions if @project.persisted?
if @project.errors.empty?
@project.import_schedule if @project.import? && !@skip_import
else
fail(error: @project.errors.full_messages.join(', '))
end
import_schedule
@project
rescue ActiveRecord::RecordInvalid => e
......@@ -165,5 +161,15 @@ def set_project_name_from_path
@project.path = @project.name.dup.parameterize
end
end
private
def import_schedule
if @project.errors.empty?
@project.import_schedule if @project.import? && !@skip_import
else
fail(error: @project.errors.full_messages.join(', '))
end
end
end
end
Markdown is supported
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