Bug 11431: (QA followup) Fix alter precedences on delete

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This commit is contained in:
Kyle M Hall 2015-09-18 06:36:10 -04:00 committed by Tomas Cohen Arazi
parent e9ba2c5c53
commit 07ddb07341
1 changed files with 4 additions and 1 deletions

View File

@ -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);