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.
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.