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>
(cherry picked from commit 9e32945f20)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2023-05-10 11:21:19 +02:00 committed by Martin Renvoize
parent d53d0f6537
commit 87864a5ccf
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

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 %]
};