add a comment about rollbacks

This commit is contained in:
Isaac Connor 2021-10-28 12:03:58 -04:00
parent b4314e5d46
commit 4122ae99a5
1 changed files with 4 additions and 4 deletions

View File

@ -744,11 +744,11 @@ sub MoveTo {
$$self{StorageId} = $$NewStorage{Id};
$self->Storage($NewStorage);
$error .= $self->save();
if ($error) {
$ZoneMinder::Database::dbh->commit() if !$was_in_transaction;
return $error;
}
# Going to leave it to upper layout as to whether we rollback or not
$ZoneMinder::Database::dbh->commit() if !$was_in_transaction;
return $error if $error;
$self->delete_files($OldStorage);
return $error;
} # end sub MoveTo