Don't delete archived empty events.

This commit is contained in:
Isaac Connor
2022-12-09 10:14:59 -05:00
parent 0390d0e6f4
commit 0ec9a9f732

View File

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