add empty option to zgvnation, zgvmanation, zgvdoktornation, berufstaetigkeit_code and ausbildungcode. to not violate fk set empty value for those to null in backend

This commit is contained in:
Harald Bamberger
2025-09-30 13:19:18 +02:00
parent 8fdabcb317
commit 9a74ab9c63
2 changed files with 12 additions and 0 deletions
@@ -143,6 +143,13 @@ class Prestudent extends FHCAPI_Controller
{
$val = boolval($val);
}
elseif (
$val === ''
&& in_array($prop, ['zgvnation', 'zgvmanation', 'zgvdoktornation', 'berufstaetigkeit_code', 'ausbildungcode'])
)
{
$val = null;
}
$update_prestudent[$prop] = $val;
}