Only update db record if there is a change in diskspace

This commit is contained in:
Isaac Connor 2018-01-17 12:53:23 -08:00
parent 10bd7cbf7f
commit ad8c775507
1 changed files with 4 additions and 2 deletions

View File

@ -320,8 +320,10 @@ sub checkFilter {
if ( $filter->{UpdateDiskSpace} ) {
my $Event = new ZoneMinder::Event( $$event{Id}, $event );
$Event->DiskSpace(undef);
my $old_diskspace = $$Event{DiskSpace};
if ( $old_diskspace != $Event->DiskSpace(undef) ) {
$Event->save();
}
} # end if UpdateDiskSpace
} # end foreach event
}