Bug 33578: Fix patron restriction types edition

When editing an existing patron restriction type you'll always get an error on saving:

Label is already in use

To test:
* Activate use of patron restriction types
* Edit any of the system types
* Create new ones

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2023-05-10 11:21:19 +02:00 committed by Tomas Cohen Arazi
parent 2c6e64ba96
commit 9e32945f20
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -211,6 +211,7 @@
var MSG_DUPLICATE_DISPLAY_TEXT = _("Restriction type label is already in use");
var existing = {
[% FOREACH ex IN existing %]
[% NEXT IF ex.code == restriction.code %]
[% ex.code | $raw %]: '[% ex.display_text | $raw %]',
[% END %]
};