Add haserrormsg boolean attribute to jobset API response

This attribute allows to know if an error occurred or not: when an
error occurs, errormsg is not an empty string. Note we can not use the
errormsg attribute because it can be arbitrarily long and is excluded
from the jobset API response.
This commit is contained in:
Antoine Eiche 2019-08-20 11:07:43 +02:00
parent f10b2c2da8
commit c8983ca076

View file

@ -87,7 +87,8 @@ sub jobsetToHash {
checkinterval => $jobset->checkinterval,
triggertime => $jobset->triggertime,
fetcherrormsg => $jobset->fetcherrormsg,
errortime => $jobset->errortime
errortime => $jobset->errortime,
haserrormsg => $jobset->errormsg eq "" ? JSON::false : JSON::true
};
}