From 0ec9a9f732125b4e7ab64166b41d8cbfcbbcb51f Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 9 Dec 2022 10:14:59 -0500 Subject: [PATCH] Don't delete archived empty events. --- scripts/zmaudit.pl.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/zmaudit.pl.in b/scripts/zmaudit.pl.in index 8812b98dd..8067aae9c 100644 --- a/scripts/zmaudit.pl.in +++ b/scripts/zmaudit.pl.in @@ -692,6 +692,10 @@ if ( $level > 1 ) { if ( $res = $selectEmptyEventsSth->execute() ) { while( my $event = $selectEmptyEventsSth->fetchrow_hashref() ) { aud_print("Found empty event with no frame records '$event->{Id}' at $$event{StartDateTime}"); + if ($$event{Archived}) { + aud_print("Not deleting because it is archived."); + next; + } if ( confirm() ) { if ( $res = $deleteEventSth->execute($event->{Id}) ) { $cleaned = 1;