From 0b7adba115d07ba870c8fd19061707971e5f65a3 Mon Sep 17 00:00:00 2001 From: cris-technikum Date: Thu, 20 May 2021 16:26:02 +0200 Subject: [PATCH] Adapted dokumentname to be empty since Nachweisdokumente can be deleted now (Datenschutz) Error was thrown in AnrechnungLib since dms_id can be null and no document exist after Datenschutz delete. This is fixed now. Signed-off-by: cris-technikum --- application/libraries/AnrechnungLib.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/application/libraries/AnrechnungLib.php b/application/libraries/AnrechnungLib.php index 7204d1616..3bec62dce 100644 --- a/application/libraries/AnrechnungLib.php +++ b/application/libraries/AnrechnungLib.php @@ -818,12 +818,7 @@ class AnrechnungLib $this->ci->DmsVersionModel->addSelect('name'); $result = $this->ci->DmsVersionModel->loadWhere(array('dms_id' => $anrechnung->dms_id)); - if (isError($result)) - { - show_error(getError($result)); - } - - $anrechnung_data->dokumentname = $result->retval[0]->name; + $anrechnung_data->dokumentname = hasData($result) ? getData($result)[0]->name : ''; return $anrechnung_data; }