diff --git a/src/lib/Hydra/Controller/API.pm b/src/lib/Hydra/Controller/API.pm index 18f60eb2..a084a3a8 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 => defined($jobset->errormsg) ? ($jobset->errormsg eq "" ? JSON::false : JSON::true) : JSON::false + haserrormsg => defined($jobset->errormsg) && $jobset->errormsg ne "" ? JSON::true : JSON::false }; }