Bug 17080: borrowers.checkprevcheckout - use the default value defined in the DBIx::Class schema

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 <veron@veron.ch>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2016-08-08 14:13:10 +01:00 committed by Kyle M Hall
parent cbe96a3b70
commit a09f1d7546
1 changed files with 2 additions and 1 deletions

View File

@ -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;