diff --git a/application/controllers/api/frontend/v1/stv/Status.php b/application/controllers/api/frontend/v1/stv/Status.php index 09a9f18b1..3c0a639cd 100644 --- a/application/controllers/api/frontend/v1/stv/Status.php +++ b/application/controllers/api/frontend/v1/stv/Status.php @@ -636,7 +636,7 @@ class Status extends FHCAPI_Controller $this->load->library('PrestudentLib'); - $this->prestudentlib->setFirstStudent( + $resFirstStudent = $this->prestudentlib->setFirstStudent( $prestudent_id, $lastAufgenommener->studiensemester_kurzbz, $lastAufgenommener->ausbildungssemester, @@ -645,9 +645,8 @@ class Status extends FHCAPI_Controller $this->input->post('statusgrund_id') ); - $this->getDataOrTerminateWithError($result); - - $this->db->trans_commit(); + $this->db->trans_complete(); + $this->getDataOrTerminateWithError($resFirstStudent); return $this->outputJsonSuccess(true); } diff --git a/application/libraries/PrestudentLib.php b/application/libraries/PrestudentLib.php index a57533da0..b1f2dc900 100644 --- a/application/libraries/PrestudentLib.php +++ b/application/libraries/PrestudentLib.php @@ -723,7 +723,7 @@ class PrestudentLib // Generate Alias - $alias = ''; + $alias = null; if (!defined('GENERATE_ALIAS_STUDENT') || GENERATE_ALIAS_STUDENT === true ) {