Trial pages are inaccessible on live site!
Closed this issue · 1 comments
It doesn't seem to be caused by any of the most recent commits, and isn't a problem on sweetpotatobase. This is the error message in my VM
Caught exception in SGN::Controller::BreedersToolbox::Trial->trial_info "Can't call method "cvterm_id" on an undefined value at /home/bje24/cxgn/sgn/bin/../lib/CXGN/Trial/TrialLayout.pm line 272."
cat-file commit 37a4bc5
modified content:
my $schema = $self->get_schema();
my $plot_width = '';
my $plot_width_cvterm_id = $schema->resultset("Cv::Cvterm")->find({name => 'plot_width'});
my $plot_width_type_id = '';
if ($plot_width_cvterm_id) {
$plot_width_type_id = $plot_width_cvterm_id->cvterm_id;
my $plot_width_row = $schema->resultset('Project::Projectprop')->find({project_id => $self->get_trial_id(), type_id => $plot_width_type_id});
if ($plot_width_row) {
$plot_width = $plot_width_row->value();
}
}
my $plot_length = '';
my $plot_length_cvterm_id = $schema->resultset("Cv::Cvterm")->find({name => 'plot_length'});
my $plot_length_type_id = '';
if ($plot_length_cvterm_id) {
$plot_length_type_id = $plot_length_cvterm_id->cvterm_id;
my $plot_length_row = $schema->resultset('Project::Projectprop')->find({project_id => $self->get_trial_id(), type_id => $plot_length_type_id});
if ($plot_length_row) {
$plot_length = $plot_length_row->value();
}
}
my $plants_per_plot = '';
my $plants_per_plot_cvterm_id = $schema->resultset("Cv::Cvterm")->find({name => 'plot_length'});
my $plants_per_plot_type_id = '';
if ($plants_per_plot_cvterm_id) {
$plants_per_plot_type_id = $plants_per_plot_cvterm_id->cvterm_id;
my $plants_per_plot_row = $schema->resultset('Project::Projectprop')->find({project_id => $self->get_trial_id(), type_id => $plants_per_plot_type_id});
if ($plants_per_plot_row) {
$plants_per_plot = $plants_per_plot_row->value();
}
}