]> git.koha-community.org Git - koha.git/commit
Bug 20227: Check for categorycode in default_borrower_circ_rules
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 16 Feb 2018 11:01:36 +0000 (12:01 +0100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 9 May 2018 14:46:06 +0000 (16:46 +0200)
commit9d44ba8b29e645dad3827b78f21567cdc7cd0cdc
tree1620ac1f779c2eaf07f42589ef8d64b6e6447b1b
parent524ae2ccfa058d605ec8e2f1373ae0ce0e72d4f1
Bug 20227: Check for categorycode in default_borrower_circ_rules

Fixes silent crash when adding the same category twice.
DBD::mysql::st execute failed: Duplicate entry 'ST' for key 'PRIMARY' [for Statement "
                INSERT INTO default_borrower_circ_rules
                    (categorycode, maxissueqty, maxonsiteissueqty, max_holds)
                    VALUES (?, ?, ?, ?)
            " with ParamValues: 0="ST", 1=undef, 2=undef, 3="3"] at /usr/share/koha/devclone/admin/smart-rules.pl line 309.

(Line number affected by bug 15524.)

Very trivial solution.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 490f473a7815854893a0b2a38366c95af345a543)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
admin/smart-rules.pl