Bug 21136: Fix add/edit patron when cities are defined
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 1 Aug 2018 12:59:01 +0000 (09:59 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 2 Aug 2018 13:11:40 +0000 (10:11 -0300)
Same as bug 21085.

When cities are defined, there is a select with name="select_city" added
to the DOM and its value will be passed to memberentry.pl
We must remove it from the attribute list before creating the
Koha::Patron object

No property select_city for Koha::Patron at
/usr/share/perl5/Exception/Class/Base.pm line 73

Test plan:
Define cities
Add or edit a patron, save

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

members/memberentry.pl

index b48975a..0b05bb1 100755 (executable)
@@ -225,6 +225,7 @@ if ( $op eq 'insert' || $op eq 'modify' || $op eq 'save' || $op eq 'duplicate' )
         qr/^csrf_token$/,
         qr/^add_debarment$/, qr/^debarred_expiration$/, # We already dealt with debarments previously
         qr/^housebound_chooser$/, qr/^housebound_deliverer$/,
+        qr/^select_city$/,
     );
     for my $regexp (@keys_to_delete) {
         for (keys %newdata) {