]> 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)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 16 Feb 2018 17:05:18 +0000 (14:05 -0300)
commit4339291f44d51accc891c99cf2eb4d68cdc3fa19
tree8b6c0000e1e428486c7ae92fdec8e020659a395b
parent427b9a70ba40fef46042f31b0972dc17b6139442
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>
admin/smart-rules.pl