Bugzilla – Attachment 151479 Details for
Bug 33578
Cannot edit patron restriction types
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33578: Fix controller when editing a restriction type
Bug-33578-Fix-controller-when-editing-a-restrictio.patch (text/plain), 1.28 KB, created by
PTFS Europe Sandboxes
on 2023-05-19 13:48:22 UTC
(
hide
)
Description:
Bug 33578: Fix controller when editing a restriction type
Filename:
MIME Type:
Creator:
PTFS Europe Sandboxes
Created:
2023-05-19 13:48:22 UTC
Size:
1.28 KB
patch
obsolete
>From 8954b418ca27aaa74e744a4871fa355d84306bdf Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 10 May 2023 13:53:20 +0200 >Subject: [PATCH] Bug 33578: Fix controller when editing a restriction type > >Do not display a warning when we are editing a restriction type and no >other types with this description exists. > >Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> >--- > admin/restrictions.pl | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > >diff --git a/admin/restrictions.pl b/admin/restrictions.pl >index 06812c0bfa..ab0c384212 100755 >--- a/admin/restrictions.pl >+++ b/admin/restrictions.pl >@@ -58,10 +58,13 @@ if ( $op eq 'add_form') { > > if ($is_a_modif) { > # Check whether another restriction already has this display text >- my $dupe = Koha::Patron::Restriction::Types->find({ >- display_text => $display_text >- }); >- if ($dupe) { >+ my $dupe = Koha::Patron::Restriction::Types->search( >+ { >+ code => { '!=' => $code }, >+ display_text => $display_text, >+ } >+ ); >+ if ($dupe->count) { > push @messages, { > type => 'error', code => 'duplicate_display_text' > }; >-- >2.30.2
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 33578
:
150957
|
150976
|
151478
|
151479
|
152610
|
152611