When importing models with associations and the main model fails to validate, Activerecord-Import will import the associations anyway. This is with the recursive: true option.
The problem is here:
|
import_associations(models, options.dup.merge(validate: false)) |
The models that failed to validate need to be filtered out from the models variable.