Bugzilla – Attachment 54468 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.38 KB, created by
Marc Véron
on 2016-08-15 12:42:27 UTC
(
hide
)
Description:
Bug 17080: borrowers.checkprevcheckout - use the default value defined in the DBIx::Class schema
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2016-08-15 12:42:27 UTC
Size:
1.38 KB
patch
obsolete
>From c70282e31f54872306ebaa45c5a13afa52527e49 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 >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >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 <veron@veron.ch> >--- > 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.1.4
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