Bugzilla – Attachment 56465 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.40 KB, created by
Nick Clemens (kidclamp)
on 2016-10-14 08:14:28 UTC
(
hide
)
Description:
Bug 17080: Make C4::Members::AddMember uses Koha::Patron->store
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2016-10-14 08:14:28 UTC
Size:
1.40 KB
patch
obsolete
>From 0382263ce30cad4195807792a314f70f22e9c9db 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 >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >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 > >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/Members.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index 4f00453..f544c07 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -641,8 +641,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.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