Trying to update an embedded model via CSV import with a release causes
an existing changeset for the root model to get destroyed. This happens
because the CSV import calls #save on the root, which has no changes
so it removes the changeset.
This patch fixes by iterating over the models the CSV row might affect
and calling #save on the embedded ones first (if necessary) to ensure
the changesets get correctly created and to avoid calling the save on
the root without changes which removes the existing changeset.
Trying to update an embedded model via CSV import with a release causes an existing changeset for the root model to get destroyed. This happens because the CSV import calls
#save
on the root, which has no changes so it removes the changeset.This patch fixes by iterating over the models the CSV row might affect and calling
#save
on the embedded ones first (if necessary) to ensure the changesets get correctly created and to avoid calling the save on the root without changes which removes the existing changeset.