Skip to content

Commit

Permalink
Merge pull request #1261 from dsenalik/1260-tv3-obi__organism_infrasp…
Browse files Browse the repository at this point in the history
…ecific

Issue #1260 mask no_rank from appearing
  • Loading branch information
spficklin committed Mar 23, 2022
2 parents 731f76e + 3bf967c commit ca4d0f0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ class obi__organism extends ChadoField {
}
$string = $settings['field_display_string'];
$label = chado_replace_tokens($string, $organism);
// Infraspecific type, if present but not used, can either be NULL,
// an empty string, or the term 'no_rank'. Special case processing
// so that this 'no_rank' term is not included in the label.
$label = trim(preg_replace('/ no_rank/', '', $label));
$entity->{$field_name}['und'][0]['value'] = [
$label_term => $label,
$genus_term => $organism->genus,
Expand Down

0 comments on commit ca4d0f0

Please sign in to comment.