Fixed bug: Failed save actions for import resources should throw an exception instead of just returning false.

This commit is contained in:
Thorsten Eckel 2017-05-03 16:05:08 +02:00
parent cbc5af2b5b
commit 97114142ed

View file

@ -100,7 +100,7 @@ module Import
return true if !attributes_changed? return true if !attributes_changed?
return true if @dry_run return true if @dry_run
@resource.save @resource.save!
true true
end end
@ -151,7 +151,7 @@ module Import
def create(resource, *_args) def create(resource, *_args)
@resource = import_class.new(resource) @resource = import_class.new(resource)
return if @dry_run return if @dry_run
@resource.save @resource.save!
external_sync_create( external_sync_create(
local: @resource, local: @resource,
remote: resource, remote: resource,