return empty array if there is no placementtest instead of error

This commit is contained in:
ma0068
2025-12-09 11:43:39 +01:00
parent e78482e947
commit 43497b186d
2 changed files with 13 additions and 3 deletions
@@ -224,7 +224,11 @@ class Aufnahmetermine extends FHCAPI_Controller
)
);
$data = $this->getDataOrTerminateWithError($result);
//check if existing placementtest
if(!hasData($result))
$this->terminateWithSuccess([]);
else
$data = getData($result);
$studienplan_arr = [];
$include_ids = [];
@@ -238,7 +242,11 @@ class Aufnahmetermine extends FHCAPI_Controller
$person_id = $this->_getPersonId($prestudent_id);
$resultRt = $this->ReihungstestModel->getReihungstestPerson($person_id);
$dataRt = $this->getDataOrTerminateWithError($resultRt);
//check if existing placementtest
if(!hasData($result))
$this->terminateWithSuccess([]);
else
$dataRt = getData($resultRt);
foreach ($dataRt as $item)
{