Bugzilla – Attachment 54165 Details for
Bug 17080
Koha::Object->new should handle default values for NOT NULL columns
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17080: borrowers.checkprevcheckout - use the default value defined in the DBIx::Class schema
Bug-17080-borrowerscheckprevcheckout---use-the-def.patch (text/plain), 1.25 KB, created by
Jonathan Druart
on 2016-08-08 13:59:42 UTC
(
hide
)
Description:
Bug 17080: borrowers.checkprevcheckout - use the default value defined in the DBIx::Class schema
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-08-08 13:59:42 UTC
Size:
1.25 KB
patch
obsolete
>From 5f26f145b013cd501f30c875b06fc252b5f8c44b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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 > >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. >--- > C4/Members.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index b868fd8..ea70e66 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -687,9 +687,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.8.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17080
:
54162
|
54163
|
54164
|
54165
|
54166
|
54465
|
54466
|
54467
|
54468
|
54469
|
56464
|
56465
|
56466
|
56467
|
56468
|
56728