Closed dwaring87 closed 1 year ago
More details:
In this particular case, the CXGN::Stock merge function failed to merge two stocks because they had different pedigrees, but the merge script still tries to delete the 'bad' stock from the database.
Should the merge script exit with an error if the merge function fails? Or should it skip the failed merge (and not attempt to delete the stock) and continue with the rest of the merges?
Here's the patch that added missing cascade deletes. Looks like it didn't touch stock_allele table though.
@lukasmueller The topic/merge_stock_errors branch updates the CXGN::Stock merge function to return an error message if the checks don't pass. Then, the merge_stocks.pl script will skip the bad stock deletion when an error is returned when trying to merge. It doesn't add any cascade deletes.
Expected Behavior
If the 'bad' stock has associated loci stored in the
stock_allele
table, the merge script will fail when trying to remove the 'bad' stock:For Bugs:
Environment
Steps to Reproduce