Raise if update/create was not possible.

This commit is contained in:
Martin Edenhofer 2017-04-06 16:16:52 +02:00
parent eb734b74cc
commit 652bc3b32c

View file

@ -32,7 +32,7 @@ module Import
def updated?(resource, *args)
@resource = lookup_existing(resource, *args)
return false if !@resource
@resource.update_attributes(resource)
@resource.update_attributes!(resource)
post_update(
instance: @resource,
attributes: resource
@ -53,7 +53,7 @@ module Import
def create(resource, *_args)
@resource = import_class.new(resource)
@resource.save
@resource.save!
ExternalSync.create(
source: source,