Bug 27604: Deal with empty pref

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 121b633cad)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 350fbb7da1)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2021-02-16 09:30:20 +01:00 committed by Andrew Fuerste-Henry
parent 196d7311ea
commit bf045e483a
1 changed files with 2 additions and 1 deletions

View File

@ -77,7 +77,8 @@ my $mandatory = GetMandatoryFields($action);
my $params = {};
if ( $action eq 'create' || $action eq 'new' ) {
my @PatronSelfRegistrationLibraryList = split '\|', C4::Context->preference('PatronSelfRegistrationLibraryList');
$params = { branchcode => { -in => \@PatronSelfRegistrationLibraryList } };
$params = { branchcode => { -in => \@PatronSelfRegistrationLibraryList } }
if @PatronSelfRegistrationLibraryList;
}
my @libraries = Koha::Libraries->search($params);