Commit c5259a31 authored by Leigh B Stoller's avatar Leigh B Stoller

Not an error if the user does not exist, when asking for reservation

history.
parent e59fc714
......@@ -1678,9 +1678,9 @@ sub ReservationHistory($)
return GeniResponse->MalformedArgsResponse("Invalid user URN")
if (!GeniHRN::IsValid($argref->{'user_urn'}));
# User should already exist; the caller used CreateUser() above first.
# User may not exist, which is okay.
my $geniuser = GeniUser->Lookup($argref->{'user_urn'}, 1);
return GeniResponse->MalformedArgsResponse("No such user")
goto nohistory
if (!defined($geniuser));
#
......@@ -1728,6 +1728,7 @@ sub ReservationHistory($)
$blob->{"history"} = \@timeline;
push(@history, $blob);
}
nohistory:
my $blob = {
"history" => \@history,
};
......
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