Fixed bug: Import detects unchanged associations as changed and unnecessarily updates record.
This commit is contained in:
parent
4dcdcf1d30
commit
b0bfe42437
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue