From cac4c056726d0800752b9af3bc7ac8cd2aefeaad Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Date: Wed, 18 Jul 2018 18:24:50 -0300
Subject: [PATCH] Bug 21085: Fix add/edit of patrons when HouseboundModule is
 set

This script takes all the parameters then set it to create/edit the
patron. We must list housebound_chooser and housebound_deliverer as not
part of patron's attributes

Test plan:
- Enable HouseboundModule
- Create a patron
=> When you save, if the patch is not applied, you will get:
No property housebound_deliverer for Koha::Patron

- Edit a patron
=> When you save, if the patch is not applied, you will get:
Patron creation failed! - DBIx::Class::Row::store_column(): No such column 'housebound_chooser' on Koha::Schema::Result::Borrower at /home/vagrant/kohaclone/Koha/Object.pm line 75

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
---
 members/memberentry.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/members/memberentry.pl b/members/memberentry.pl
index 7f48bfd..e5090b2 100755
--- a/members/memberentry.pl
+++ b/members/memberentry.pl
@@ -223,7 +223,8 @@ if ( $op eq 'insert' || $op eq 'modify' || $op eq 'save' || $op eq 'duplicate' )
         qr/^\d+-DAYS/,
         qr/^patron_attr_/,
         qr/^csrf_token$/,
-        qr/^add_debarment$/, qr/^debarred_expiration$/ # We already dealt with debarments previously
+        qr/^add_debarment$/, qr/^debarred_expiration$/, # We already dealt with debarments previously
+        qr/^housebound_chooser$/, qr/^housebound_deliverer$/,
     );
     for my $regexp (@keys_to_delete) {
         for (keys %newdata) {
-- 
2.1.4