Bugzilla – Attachment 145801 Details for
Bug 31095
Remove Koha::Patron::Debarment::GetDebarments and use $patron->restrictions in preference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31095: DBIC additions and relation name tweak
Bug-31095-DBIC-additions-and-relation-name-tweak.patch (text/plain), 2.25 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-01-30 15:59:38 UTC
(
hide
)
Description:
Bug 31095: DBIC additions and relation name tweak
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-01-30 15:59:38 UTC
Size:
2.25 KB
patch
obsolete
>From 3f7e8bf2a831c32bf3d7c03775084026d77bf757 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 30 Jan 2023 12:57:32 -0300 >Subject: [PATCH] Bug 31095: DBIC additions and relation name tweak > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Patron.pm | 2 +- > Koha/Schema/Result/Borrower.pm | 7 +++++++ > Koha/Schema/Result/BorrowerDebarment.pm | 7 ++++++- > 3 files changed, 14 insertions(+), 2 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 26aa414f716..e027e0ce192 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -1268,7 +1268,7 @@ Returns the patron restrictions. > > sub restrictions { > my ($self) = @_; >- my $restrictions_rs = $self->_result->borrower_debarments; >+ my $restrictions_rs = $self->_result->restrictions; > return Koha::Patron::Restrictions->_new_from_dbic($restrictions_rs); > } > >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index f32bb51afda..c8f4f32dd2f 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -2061,6 +2061,13 @@ __PACKAGE__->many_to_many("permissions", "user_permissions", "permission"); > # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-10 17:43:30 > # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5hh2lGCcKclyTnY7KNPkvg > >+__PACKAGE__->has_many( >+ "restrictions", >+ "Koha::Schema::Result::BorrowerDebarment", >+ { "foreign.borrowernumber" => "self.borrowernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > __PACKAGE__->has_many( > "extended_attributes", > "Koha::Schema::Result::BorrowerAttribute", >diff --git a/Koha/Schema/Result/BorrowerDebarment.pm b/Koha/Schema/Result/BorrowerDebarment.pm >index 9c025284e59..da2b1413284 100644 >--- a/Koha/Schema/Result/BorrowerDebarment.pm >+++ b/Koha/Schema/Result/BorrowerDebarment.pm >@@ -165,6 +165,11 @@ __PACKAGE__->belongs_to( > # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-08-19 17:53:04 > # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kDCkA7XrjKXlrFG5lk8Lgg > >+sub koha_objects_class { >+ 'Koha::Patron::Restrictions'; >+} >+sub koha_object_class { >+ 'Koha::Patron::Restriction'; >+} > >-# You can replace this text with custom code or comments, and it will be preserved on regeneration > 1; >-- >2.34.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 31095
:
139614
|
139719
|
139720
|
139721
|
139722
|
139723
|
139724
|
139725
|
139726
|
139727
|
139728
|
139742
|
139743
|
139744
|
139745
|
139746
|
139747
|
139748
|
139749
|
139750
|
139751
|
139752
|
139753
|
139754
|
139755
|
139756
|
139757
|
139758
|
140714
|
140715
|
140716
|
140717
|
140718
|
140719
|
140720
|
140721
|
140722
|
140723
|
140724
|
140725
|
140726
|
140727
|
140728
|
140729
|
140730
|
140731
|
142059
|
142060
|
142061
|
142062
|
142063
|
142064
|
142065
|
142066
|
142067
|
142068
|
142069
|
142070
|
142071
|
142072
|
142073
|
142074
|
142075
|
142076
|
143745
|
143746
|
143747
|
143748
|
143749
|
143750
|
143751
|
143752
|
143753
|
143754
|
143755
|
143756
|
143757
|
143758
|
143759
|
143760
|
143761
|
143762
|
143763
|
144903
|
144904
|
144905
|
144906
|
144907
|
144908
|
144909
|
144910
|
144911
|
144912
|
144913
|
144914
|
144915
|
144916
|
144917
|
144918
|
144919
|
144920
|
144921
|
145800
| 145801 |
145803
|
145845