All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 8a2e4d6a authored by Leigh B. Stoller's avatar Leigh B. Stoller

Lets try the a new fix ...

parent 417110af
......@@ -575,19 +575,14 @@ sub Refresh($)
my $idx = $self->idx();
my $query_result =
DBQueryWarn("select e.*,i.parent_guid,t.guid from experiments as e ".
"left join experiment_templates as t on ".
" t.exptidx=e.idx ".
"left join experiment_template_instances as i on ".
" i.exptidx=e.idx ".
"where e.idx='$idx'");
DBQueryWarn("select * from experiments where idx=$idx");
return -1
if (!$query_result || !$query_result->numrows);
$self->{'EXPT'} = $query_result->fetchrow_hashref();
$self->{'ISINSTANCE'} = defined($self->{'EXPT'}->{'parent_guid'});
$self->{'ISTEMPLATE'} = defined($self->{'EXPT'}->{'guid'});
$self->{'ISINSTANCE'} = undef;
$self->{'ISTEMPLATE'} = undef;
$query_result =
DBQueryWarn("select * from experiment_stats where exptidx='$idx'");
......@@ -2423,6 +2418,19 @@ sub IsInstance($)
return 0
if (! ref($self));
if (defined($self->{'ISINSTANCE'})) {
return $self->{'ISINSTANCE'};
}
my $idx = $self->idx();
my $query_result =
DBQueryWarn("select parent_guid from experiment_template_instances ".
"where exptidx='$idx'");
return 0
if (!$query_result);
$self->{'ISINSTANCE'} = $query_result->numrows;
return $self->{'ISINSTANCE'};
}
......@@ -2437,6 +2445,19 @@ sub IsTemplate($)
return 0
if (! ref($self));
if (defined($self->{'ISTEMPLATE'})) {
return $self->{'ISTEMPLATE'};
}
my $idx = $self->idx();
my $query_result =
DBQueryWarn("select guid from experiment_templates ".
"where exptidx='$idx'");
return 0
if (!$query_result);
$self->{'ISTEMPLATE'} = $query_result->numrows;
return $self->{'ISTEMPLATE'};
}
......
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