From f04b81af0fcc6b427ae6e183732c9f5076b33293 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 18 Sep 2015 06:36:10 -0400 Subject: [PATCH] Bug 11431 [QA Followup] - Fix alter precedences on delete Signed-off-by: Katrin Fischer --- admin/audio_alerts.pl | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/admin/audio_alerts.pl b/admin/audio_alerts.pl index f62bacd..dc0903f 100755 --- a/admin/audio_alerts.pl +++ b/admin/audio_alerts.pl @@ -49,7 +49,10 @@ if ( $selector && $sound ) { Koha::AudioAlert->new( { selector => $selector, sound => $sound } )->store(); } -map { Koha::AudioAlerts->find($_)->delete() } @delete; +if (@delete) { + map { Koha::AudioAlerts->find($_)->delete() } @delete; + Koha::AudioAlerts->fix_precedences(); +} if ( $id && $action && $where && $action eq 'move' ) { Koha::AudioAlerts->find($id)->move($where); -- 1.7.2.5