Bugzilla – Attachment 92801 Details for
Bug 23608
Koha::Objects::Limit::Library->get_library_limits can return undef
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23608: Update return value of Koha::Object::Limit::Library
Bug-23608-Update-return-value-of-KohaObjectLimitLi.patch (text/plain), 1.54 KB, created by
Martin Renvoize (ashimema)
on 2019-09-13 14:05:04 UTC
(
hide
)
Description:
Bug 23608: Update return value of Koha::Object::Limit::Library
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-09-13 14:05:04 UTC
Size:
1.54 KB
patch
obsolete
>From 2aaa69e1de78ebc7aef080f478ed9be27f038f49 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 13 Sep 2019 15:04:15 +0100 >Subject: [PATCH] Bug 23608: Update return value of > Koha::Object::Limit::Library > >--- > Koha/Object/Limit/Library.pm | 15 +++++++-------- > 1 file changed, 7 insertions(+), 8 deletions(-) > >diff --git a/Koha/Object/Limit/Library.pm b/Koha/Object/Limit/Library.pm >index 7d86b94d63..341b674d3b 100644 >--- a/Koha/Object/Limit/Library.pm >+++ b/Koha/Object/Limit/Library.pm >@@ -73,24 +73,23 @@ sub library_limits { > my $limits = $object->get_library_limits(); > > Returns the current library limits in the form of a Koha::Libraries iterator object. >-It returns undef if no library limits defined. >+It returns a Koha::Libraries resultset containing all libraries if no library limits >+are defined. > > =cut > > sub get_library_limits { > my ($self) = @_; > >- my @branchcodes >- = $self->_library_limit_rs->search( >+ my @branchcodes = $self->_library_limit_rs->search( > { $self->_library_limits->{id} => $self->id } ) >- ->get_column( $self->_library_limits->{library} )->all(); >+ ->get_column( $self->_library_limits->{library} )->all(); > >- return unless @branchcodes; >+ my $libraries = Koha::Libraries->new(); >+ return $libraries unless @branchcodes; > > my $filter = [ map { { branchcode => $_ } } @branchcodes ]; >- my $libraries = Koha::Libraries->search( $filter ); >- >- return $libraries; >+ return $libraries->search($filter); > } > > =head3 add_library_limit >-- >2.20.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 23608
: 92801