Commit 90bca5d5 authored by Leigh Stoller's avatar Leigh Stoller

Bug fix to the type consistency checking (the checks that make sure

only one osid,pctype maps to an image (osid2imageid).
parent d65ca782
......@@ -464,12 +464,11 @@ elsif (! $isadmin) {
#
UserError("Node Types: Must have at least one node type")
if ($#mtypes_array < 0);
my $typeclause = join(" or ", map("type='$_'", @mtypes_array));
# Check validity of mtype_* args, since the keys are dynamically generated.
my $node_types_selected = 0;
my @mtype_keys = grep(/^mtype_/, keys(%newimageid_args));
foreach $key (@mtype_keys) {
my @mtype_keys = ();
foreach $key (grep(/^mtype_/, keys(%newimageid_args))) {
my $value = $newimageid_args{$key};
print STDERR "mtype: '$key' -> '$value'\n"
if ($debug);
......@@ -482,11 +481,14 @@ foreach $key (@mtype_keys) {
}
elsif ($value eq "1") {
$node_types_selected++;
push(@mtype_keys, $key);
}
}
UserError("Node Types: Must select at least one node type")
if ($node_types_selected == 0 && !$force);
my $typeclause = join(" or ", map("type='$_'", @mtype_keys));
#
# Check sanity of node name and that user can create an image from it.
#
......
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