Commit 0640cfc0 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

The rspec is now optional, we allow new profiles with no topo, as for

the new create image workflow.
parent d74b6afa
......@@ -435,7 +435,8 @@ sub Create($$$$$$)
}
my $profileid = TBGetUniqueIndex("next_profile", undef, 1);
my $rspec = DBQuoteSpecial($argref->{'rspec'});
my $rspec = DBQuoteSpecial($argref->{'rspec'})
if (exists($argref->{'rspec'}));
my $cquery = "";
my $vquery = "";
......@@ -450,7 +451,7 @@ sub Create($$$$$$)
$vquery = $cquery;
$vquery .= ",uuid='$vuuid',created=now()";
$vquery .= ",creator='$uid',creator_idx='$uid_idx'";
$vquery .= ",rspec=$rspec";
$vquery .= ",rspec=$rspec" if (defined($rspec));
# Set derived from pointer.
if (defined($parent)) {
......@@ -1635,6 +1636,9 @@ sub InsertImageRecords($$)
my $profileid = $self->profileid();
my $version = $self->version();
return 0
if ($self->rspec() eq "");
my $rspec = GeniXML::Parse($self->rspec());
if (! defined($rspec)) {
$$perrmsg = "Could not parse rspec\n";
......
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