Skip to content

Commit

Permalink
Merge pull request #1193 from paczian/develop
Browse files Browse the repository at this point in the history
ebi patch & minor bugfix
  • Loading branch information
Tobias Paczian committed Apr 26, 2017
2 parents 3fd1d74 + a74fd9e commit 236f3ec
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/MGRAST/lib/JobDB/Project.pm
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ sub remove_job {
my $dbh = $self->_master()->db_handle();
my $str = "UPDATE Job SET primary_project = NULL, _primary_project_db = NULL WHERE job_id = ".$job->job_id;
$dbh->do($str);
$dbh->commit();

return "success: job removed";
}
Expand Down
16 changes: 16 additions & 0 deletions src/MGRAST/lib/resources/project.pm
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,22 @@ sub post_action {
}
}
$metadbm->MetaDataEntry->create( $attr );

$val = $self->cgi->param('biomename'.$mg->{metagenome_id});
$attr = {
collection => $mg->sample,
tag => 'ncbi_taxon_name',
value => $val,
required => 0,
mixs => 0
};
$existing = $metadbm->MetaDataEntry->get_objects($attr);
if (scalar(@$existing)) {
foreach my $pmd (@$existing) {
$pmd->delete();
}
}
$metadbm->MetaDataEntry->create( $attr );
} else {
$self->return_data( { "ERROR" => "error updating sample biome entries for ebi submission" }, 500 );
}
Expand Down

0 comments on commit 236f3ec

Please sign in to comment.