# remove keys from %newdata that is not part of patron's attributes
{
my @keys_to_delete = (
qr/^flags$/,
qr/^BorrowerMandatoryField$/,
qr/^category_type$/,
qr/^check_member$/,
# Replace checkbox 'agreed' by datetime in gdpr_proc_consent
$borrower{gdpr_proc_consent} = dt_from_string if $borrower{gdpr_proc_consent} && $borrower{gdpr_proc_consent} eq 'agreed';
delete $borrower{flags};
return %borrower;
}
-