Skip to content

Commit

Permalink
Return if no determination
Browse files Browse the repository at this point in the history
  • Loading branch information
CarolineDenis committed Aug 9, 2024
1 parent 6dcf055 commit 9d9ad3e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ export const businessRuleDefs: MappedBusinessRuleDefs = {
collectionObjectType: (resource) => {
// Delete all determinations
const determinations = resource.getDependentResource('determinations');
if (determinations?.models.length === 0) {
return;
}
const taxon = determinations?.models[0].get('taxon');
const taxonId = idFromUrl(taxon ?? '');
const COType = resource.get('collectionObjectType');
Expand Down

0 comments on commit 9d9ad3e

Please sign in to comment.