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