diff --git a/src/lib/Hydra/Controller/API.pm b/src/lib/Hydra/Controller/API.pm index 8bb710e02..a084a3a83 100644 --- a/src/lib/Hydra/Controller/API.pm +++ b/src/lib/Hydra/Controller/API.pm @@ -88,7 +88,7 @@ sub jobsetToHash { triggertime => $jobset->triggertime, fetcherrormsg => $jobset->fetcherrormsg, errortime => $jobset->errortime, - haserrormsg => $jobset->errormsg eq "" ? JSON::false : JSON::true + haserrormsg => defined($jobset->errormsg) && $jobset->errormsg ne "" ? JSON::true : JSON::false }; }