From a09f1d75460b85abbf94a151a40cc1643bd4bcec Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 8 Aug 2016 14:13:10 +0100 Subject: [PATCH] Bug 17080: borrowers.checkprevcheckout - use the default value defined in the DBIx::Class schema MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This line has been added by bug 16917 to define the default value of borrowers.checkprevcheckout. As this value is defined in the DBIx::Class schema, we should not have to handle it here. Test plan: Confirm that this patch does not reintroduced the bug fixed by bug 16917. Signed-off-by: Marc Véron Signed-off-by: Nick Clemens Signed-off-by: Kyle M Hall --- C4/Members.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Members.pm b/C4/Members.pm index 9accdcd314..d7556b759f 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -630,9 +630,10 @@ sub AddMember { $data{'sms_provider_id'} = undef if ( not $data{'sms_provider_id'} ); # get only the columns of Borrower + # FIXME Do we really need this check? my @columns = $schema->source('Borrower')->columns; my $new_member = { map { join(' ',@columns) =~ /$_/ ? ( $_ => $data{$_} ) : () } keys(%data) } ; - $new_member->{checkprevcheckout} ||= 'inherit'; + delete $new_member->{borrowernumber}; my $patron = Koha::Patron->new( $new_member )->store; -- 2.39.5