Bug 38974: Fix error in OPAC patron update

Test plan:

1) Make sure Patron category is checked in the system preference PatronSelfModificationBorrowerUnwantedField
2) Log in to the opac
3) Go to "Personal details"
4) Select any value for "Date of birth"
5) Click save
6) This must not yield error 500. (But may be a successful save or a validation error).

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Andreas Jonsson 2025-05-22 11:00:35 +02:00 committed by Lucas Gass
parent c4f7b14906
commit 04ebdd4ac1
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 1 additions and 0 deletions

View File

@ -306,6 +306,7 @@ if ( $op eq 'cud-create' ) {
my %borrower = ParseCgiForBorrower($cgi);
$borrower{borrowernumber} = $borrowernumber;
$borrower{categorycode} = $borrower->{categorycode};
my @empty_mandatory_fields = grep { $_ ne 'password' } # password is not required when editing personal details
( CheckMandatoryFields( \%borrower, $op ), CheckMandatoryAttributes( \%borrower, $attributes ) );