kids-first / kf-api-dataservice

:file_cabinet: Primary API for interacting with the Kids First data
http://kf-api-dataservice.kidsfirstdrc.org
Apache License 2.0
5 stars 2 forks source link

♻️ Don't delete samples with 0 biospecimens #667

Closed znatty22 closed 3 months ago

znatty22 commented 3 months ago

Motivation

Up until now we considered samples with 0 child biospecimens to be invalid, and therefore the API would automatically delete them.

Now that we can track an aribitrary sample tree via the sample relationships table, we know we will have samples that have 0 child biospecimens. We don't want to automatically delete these anymore.

Approach

Remove the auto-delete functionality that deletes samples with 0 child biospecimens

Future

We may want to add auto-delete logic that deletes samples that have 0 child biospecimens and 0 child samples. This can be done in another PR. Before we do this we should discuss whether it is valid to have a "leaf" sample in a sample tree which has 0 containers/aliquots yet.