Commit cf6fc01f authored by Nathan Johnson's avatar Nathan Johnson
Browse files

Now always stores external_db_id if defined and only throws if not defined and type is xref

parent 7a10192f
......@@ -108,9 +108,12 @@ sub new {
$self->{'description'} = $full_desc || throw('FULL_DESC must be given');
$self->{'summary'} = $summary || throw('SUMMARY must be given');
$self->{'type'} = $type || throw('TYPE must be given');
$self->{'external_db_id'} = $ex_db_id;
if (lc($type) eq "xref") {
$self->{'external_db_id'} = $ex_db_id || throw('EXTERNAL_DB_ID must be given');
throw('EXTERNAL_DB_ID must be given') if ! defined $ex_db_id;
$self->{'identifier'} = $identifier || throw('IDENTIFIER must be given');
$self->{'query_score'} = $query_score if(defined($query_score));
$self->{'target_score'} = $target_score if(defined($target_score));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment