Project result: add a supportsDynamicRunCommand helper

This commit is contained in:
Graham Christensen 2022-01-24 16:09:45 -05:00
parent 38514ae494
commit daa6864a58
2 changed files with 7 additions and 1 deletions

View file

@ -75,7 +75,7 @@ sub isBuildEligibleForDynamicRunCommand {
return 0;
}
if (! $build->project->enable_dynamic_run_command) {
if (! $build->project->supportsDynamicRunCommand()) {
return 0;
}

View file

@ -246,6 +246,12 @@ sub builds {
return $self->jobsets->related_resultset('builds');
};
sub supportsDynamicRunCommand {
my ($self) = @_;
return $self->get_column('enable_dynamic_run_command') == 1;
}
sub as_json {
my $self = shift;