From b0bfe424373d679515cb43ce0eef6c23b188e188 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Tue, 10 Oct 2017 16:21:59 +0200 Subject: [PATCH] Fixed bug: Import detects unchanged associations as changed and unnecessarily updates record. --- lib/import/base_resource.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/import/base_resource.rb b/lib/import/base_resource.rb index f96a2aeda..93a57321f 100644 --- a/lib/import/base_resource.rb +++ b/lib/import/base_resource.rb @@ -156,6 +156,10 @@ module Import else state[association] = source.send(association) end + + # sort arrays to avoid wrong change detection + next if !state[association].respond_to?(:sort!) + state[association].sort! end state end