Don't audit for records that failed their DML

This commit is contained in:
2023-05-12 12:21:34 -05:00
parent 7a5124ae06
commit 3e7684bb8d
2 changed files with 17 additions and 1 deletions

View File

@ -79,7 +79,6 @@ public class DMLAuditAction extends AbstractQActionFunction<DMLAuditInput, DMLAu
{
DMLAuditOutput output = new DMLAuditOutput();
AbstractTableActionInput tableActionInput = input.getTableActionInput();
List<QRecord> recordList = input.getRecordList();
List<QRecord> oldRecordList = input.getOldRecordList();
QTableMetaData table = tableActionInput.getTable();
long start = System.currentTimeMillis();
@ -87,6 +86,9 @@ public class DMLAuditAction extends AbstractQActionFunction<DMLAuditInput, DMLAu
try
{
List<QRecord> recordList = CollectionUtils.nonNullList(input.getRecordList()).stream()
.filter(r -> CollectionUtils.nullSafeIsEmpty(r.getErrors())).toList();
AuditLevel auditLevel = getAuditLevel(tableActionInput);
if(auditLevel == null || auditLevel.equals(AuditLevel.NONE) || CollectionUtils.nullSafeIsEmpty(recordList))
{