From 07ddb073415696ef405b5ff1bec4389362be5872 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 file changed, 4 insertions(+), 1 deletion(-) diff --git a/admin/audio_alerts.pl b/admin/audio_alerts.pl index f62bacdd4e..dc0903f6a1 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); -- 2.39.5