Bug 18930: Do not insert '*' in circulation_rules

We must insert NULL instead, otherwise the FK constraint will fail

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2018-10-25 10:16:20 -03:00 committed by Martin Renvoize
parent fd63fe7d12
commit 5512f94505
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ if( CheckVersion( $DBversion ) ) {
if ( column_exists( 'refund_lost_item_fee_rules', 'refund' ) ) {
$dbh->do("
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value )
SELECT NULL, branchcode, NULL, 'refund', refund
SELECT NULL, IF(branchcode='*', NULL, branchcode), NULL, 'refund', refund
FROM refund_lost_item_fee_rules
");
$dbh->do("DROP TABLE refund_lost_item_fee_rules");