Bug 39226: Add borrowernumber 0 when creating patron modification

Test plan:
Test with and without this patch. Verify that you see no warn with Missing
value for primary key column anymore in plack-opac-error.
Enable self registration.
Register a new patron.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c7bdbf937c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Marcel de Rooy 2025-03-03 13:09:12 +00:00 committed by Fridolin Somers
parent 52cef274bd
commit e9b4a1da3d
No known key found for this signature in database
GPG Key ID: 9A8E73E2A8B96537
1 changed files with 1 additions and 0 deletions

View File

@ -201,6 +201,7 @@ if ( $op eq 'cud-create' ) {
$borrower{verification_token} = $verification_token;
$borrower{extended_attributes} = to_json($attributes);
$borrower{borrowernumber} = 0; # prevent warn Missing value for PK column
Koha::Patron::Modification->new( \%borrower )->store();
#Send verification email