5 use CXGN
::Phenome
::Individual
;
6 use CXGN
::DB
::Connection
;
7 use CatalystX
::GlobalContext
qw( $c );
10 my $individual_id = $cgi->param("individual_id");
12 my $dbh = $c->dbc->dbh;
14 unless ($individual_id =~m /^\d+$/) {
15 $c->throw( is_error=>0,
16 message => "No individual exists for identifier $individual_id",
19 my $individual = CXGN::Phenome::Individual->new($dbh, $individual_id) ;
20 #redirecting to the stock page
21 my $stock_id = $individual->get_stock_id;
22 $c->throw(is_error=>0,
23 message=>"No individual exists for identifier $individual_id",
25 print $cgi->redirect("/stock/$stock_id/view", 301);