Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dimus committed Mar 16, 2012
1 parent e752cbf commit 0b51aac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/name_resolver.rb
Expand Up @@ -411,7 +411,7 @@ def format_result
if dr[:classification_path_ids] if dr[:classification_path_ids]
last_classification_id = dr[:classification_path_ids].split("|").last last_classification_id = dr[:classification_path_ids].split("|").last
if last_classification_id && last_classification_id != dr[:taxon_id] if last_classification_id && last_classification_id != dr[:taxon_id]
ns = NameString.connection.select_value("select name from name_strings ns join name_string_indices nsi on nsi.name_string_id = ns.id where nsi.taxon_id = %s and data_source_id = %s limit 1" % [NameString.connection.quote(dr[:taxon_id]), NameString.connection.quote(dr[:data_source_id])]) ns = NameString.connection.select_value("select name from name_strings ns join name_string_indices nsi on nsi.name_string_id = ns.id where nsi.taxon_id = %s and data_source_id = %s limit 1" % [NameString.connection.quote(last_classification_id), NameString.connection.quote(dr[:data_source_id])])
match[:current_taxon_id] = last_classification_id match[:current_taxon_id] = last_classification_id
match[:current_name_string] = ns if ns match[:current_name_string] = ns if ns
end end
Expand Down

0 comments on commit 0b51aac

Please sign in to comment.