Commit 9f5f2ab7 authored by Matthieu Muffato's avatar Matthieu Muffato Committed by ens-bwalts
Browse files

When using a tweak to set a resource description, set the resource class too

parent b2e0cab9
......@@ -814,6 +814,16 @@ sub apply_tweaks {
} else {
# Auto-vivification of the ResourceClass
unless (@$resource_classes) {
print "Tweak.Adding \tresource_class[$rc_pattern]\n";
my ($resource_class) = $self->add_new_or_update( 'ResourceClass', # NB: add_new_or_update returns a list
'name' => $rc_pattern,
);
push @$resource_classes, $resource_class;
$need_write = 1;
}
my $new_value = destringify( $new_value_str );
my ($new_submission_cmd_args, $new_worker_cmd_args) = (ref($new_value) eq 'ARRAY') ? @$new_value : ($new_value, '');
......
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