collectionspace / collectionspace-mapper

MIT License
0 stars 0 forks source link

Add multiple_recs_found config option #127

Closed kspurgin closed 3 years ago

kspurgin commented 3 years ago

Setting this option to use_first supports batch deletion of records with duplicate IDs.

Previously: if RecordStatusService looked up an ID and found more than one existing CS records with that ID, it would raise an error. This meant the CSV Importer would not transfer any data for that ID. Generally this makes sense, as it could be very destructive to update or delete a randomly chosen record that happens to share an ID with another record. (Since CS does allow you to create different records having the same ID)

Now: if you set this option to use_first, the CSV Importer processing step will report warnings on any IDs for which more than one result is found, including the URI for the record which will be updated or deleted if you proceed with the transfer step.