View | Details | Raw Unified | Return to bug 33578
Collapse All | Expand All

(-)a/admin/restrictions.pl (-5 / +7 lines)
Lines 58-67 if ( $op eq 'add_form') { Link Here
58
58
59
    if ($is_a_modif) {
59
    if ($is_a_modif) {
60
        # Check whether another restriction already has this display text
60
        # Check whether another restriction already has this display text
61
        my $dupe = Koha::Patron::Restriction::Types->find({
61
        my $dupe = Koha::Patron::Restriction::Types->search(
62
            display_text => $display_text
62
            {
63
        });
63
                code         => { '!=' => $code },
64
        if ($dupe) {
64
                display_text => $display_text,
65
            }
66
        );
67
        if ($dupe->count) {
65
            push @messages, {
68
            push @messages, {
66
                type => 'error', code => 'duplicate_display_text'
69
                type => 'error', code => 'duplicate_display_text'
67
            };
70
            };
68
- 

Return to bug 33578