Merged in bugfix/PMCORE-805 (pull request #8406)

PMCORE-805

Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
Paula Quispe
2022-03-25 20:52:50 +00:00
committed by Julio Cesar Laura Avendaño

View File

@@ -695,9 +695,14 @@ class Cases
$response = []; $response = [];
$subApplication = new SubApplication(); $subApplication = new SubApplication();
$data = $subApplication->loadByAppUidParent($applicationUid); $data = $subApplication->loadByAppUidParent($applicationUid);
foreach ($data as $item) { if (!empty($data)) {
$response[] = $this->getCaseInfo($item['APP_UID'], $userUid); foreach ($data as $item) {
$response[] = $this->getCaseInfo($item['APP_UID'], $userUid);
}
} else {
throw new Exception(G::LoadTranslation("ID_CASE_DOES_NOT_EXIST", [$applicationUid]));
} }
return $response; return $response;
} catch (Exception $e) { } catch (Exception $e) {
throw $e; throw $e;