Fixed bug: Failed save actions for import resources should throw an exception instead of just returning false.
This commit is contained in:
parent
cbc5af2b5b
commit
97114142ed
1 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue