From 652bc3b32c85393fea9b1ecfad65be025a8ea670 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 6 Apr 2017 16:16:52 +0200 Subject: [PATCH] Raise if update/create was not possible. --- lib/import/base_resource.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/import/base_resource.rb b/lib/import/base_resource.rb index ac05ef377..e76a17528 100644 --- a/lib/import/base_resource.rb +++ b/lib/import/base_resource.rb @@ -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,