Bugzilla – Attachment 54163 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: Make C4::Members::AddMember uses Koha::Patron->store
Bug-17080-Make-C4MembersAddMember-uses-KohaPatron-.patch (text/plain), 1.21 KB, created by
Jonathan Druart
on 2016-08-08 13:59:31 UTC
(
hide
)
Description:
Bug 17080: Make C4::Members::AddMember uses Koha::Patron->store
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-08-08 13:59:31 UTC
Size:
1.21 KB
patch
obsolete
>From 0b2699c82f9fbbc1962370cab0bbeb21c2d71019 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 8 Aug 2016 14:12:09 +0100 >Subject: [PATCH] Bug 17080: Make C4::Members::AddMember uses > Koha::Patron->store > >These calls have been added from commit e196f19 (Bug 12633: Remove SQLHelper >in C4::Members) which added a TODO: >"This patch replaced the calls to SQLHelper to use DBIX::Class. >TODO: Move them to Koha::Borrower." > >This is now done by this patch: instead of calling DBIx::Class directly >we use Koha::Patron >--- > C4/Members.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index 061172f..b868fd8 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -692,8 +692,8 @@ sub AddMember { > $new_member->{checkprevcheckout} ||= 'inherit'; > delete $new_member->{borrowernumber}; > >- my $rs = $schema->resultset('Borrower'); >- $data{borrowernumber} = $rs->create($new_member)->id; >+ my $patron = Koha::Patron->new( $new_member )->store; >+ $data{borrowernumber} = $patron->borrowernumber; > > # If NorwegianPatronDBEnable is enabled, we set syncstatus to something that a > # cronjob will use for syncing with NL >-- >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