Commit 8a923c98 authored by Leigh Stoller's avatar Leigh Stoller

Slight code rearrangement to avoid message to tbops when an instance

is gone but the web page has not figured it out yet.
parent 192cc94d
......@@ -175,13 +175,6 @@ my $instance = APT_Instance->Lookup($token);
if (!defined($instance)) {
$instance = APT_Instance->LookupBySlice($token);
}
if (!defined($instance)) {
# Lets not make this a fatal error; when coming from the web interface,
# we do not need to send email.
UserError("No such instance $token");
}
my $uuid = $instance->uuid();
#
# Grab the webtask object.
#
......@@ -204,6 +197,13 @@ if (defined($this_user)) {
$geniuser = GeniUser->CreateFromLocal($this_user);
}
if (!defined($instance)) {
# Lets not make this a fatal error; when coming from the web interface,
# we do not need to send email.
UserError("No such instance $token");
}
my $uuid = $instance->uuid();
if ($action eq "snapshot") {
DoSnapshot();
}
......
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