diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8f00f33509..10feeef5a2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,10 +23,20 @@ jobs: uses: actions/checkout@v2 - name: Get breedbase_dockerfile + if: startsWith(steps.extract_branch.outputs.branch, 'feature/') || startsWith(steps.extract_branch.outputs.branch, 'bug/') uses: actions/checkout@master with: repository: Breeding-Insight/breedbase_dockerfile path: breedbase_dockerfile + ref: 'develop' + + - name: Get breedbase_dockerfile + if: startsWith(steps.extract_branch.outputs.branch, 'hotfix/') + uses: actions/checkout@master + with: + repository: Breeding-Insight/breedbase_dockerfile + path: breedbase_dockerfile + ref: 'master' - name: Get the submodules working-directory: ./breedbase_dockerfile diff --git a/lib/CXGN/BrAPI/v2/Germplasm.pm b/lib/CXGN/BrAPI/v2/Germplasm.pm index 2b7ec4265f..133eb537d7 100644 --- a/lib/CXGN/BrAPI/v2/Germplasm.pm +++ b/lib/CXGN/BrAPI/v2/Germplasm.pm @@ -631,7 +631,7 @@ sub store { # Check if pedigree parents don't exist my $missing_parents = ''; foreach (@$pedigree_parents){ - if (exists($accessions_missing_hash{$_})){ + if (length($_) > 0 && exists($accessions_missing_hash{$_})){ $missing_parents = $missing_parents . $_ ."," ; } } @@ -704,7 +704,7 @@ sub store { } my $pedigree = $params->{pedigree} || undef; my $pedigree_array = _process_pedigree_string($pedigree); - my $mother = defined $pedigree_array && scalar(@$pedigree_array) > 0 ? @$pedigree_array[0] : undef; + my $mother = defined $pedigree_array && scalar(@$pedigree_array) > 0 && length(@$pedigree_array[0]) > 0 ? @$pedigree_array[0] : undef; my $father = defined $pedigree_array && scalar(@$pedigree_array) > 1 ? @$pedigree_array[1] : undef; my $synonyms = $params->{synonyms} || []; my @synonymNames;