Raise if update/create was not possible.
This commit is contained in:
parent
eb734b74cc
commit
652bc3b32c
1 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ module Import
|
||||||
def updated?(resource, *args)
|
def updated?(resource, *args)
|
||||||
@resource = lookup_existing(resource, *args)
|
@resource = lookup_existing(resource, *args)
|
||||||
return false if !@resource
|
return false if !@resource
|
||||||
@resource.update_attributes(resource)
|
@resource.update_attributes!(resource)
|
||||||
post_update(
|
post_update(
|
||||||
instance: @resource,
|
instance: @resource,
|
||||||
attributes: resource
|
attributes: resource
|
||||||
|
@ -53,7 +53,7 @@ module Import
|
||||||
|
|
||||||
def create(resource, *_args)
|
def create(resource, *_args)
|
||||||
@resource = import_class.new(resource)
|
@resource = import_class.new(resource)
|
||||||
@resource.save
|
@resource.save!
|
||||||
|
|
||||||
ExternalSync.create(
|
ExternalSync.create(
|
||||||
source: source,
|
source: source,
|
||||||
|
|
Loading…
Reference in a new issue