fixed orientation duplicates check
This commit is contained in:
		
							parent
							
								
									b60d5ebf61
								
							
						
					
					
						commit
						a4de86b5df
					
				
					 1 changed files with 7 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -70,18 +70,19 @@ public class OrientationTableDuplicatesCheck implements DBIntegrityCheck {
 | 
			
		|||
                return "OK";
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            final List<Long> checkedToDelete = toDelete
 | 
			
		||||
                    .stream()
 | 
			
		||||
                    .filter(this::doubleCheck)
 | 
			
		||||
                    .collect(Collectors.toList());
 | 
			
		||||
 | 
			
		||||
            if (tryFix) {
 | 
			
		||||
                final List<Long> checkedToDelete = toDelete
 | 
			
		||||
                        .stream()
 | 
			
		||||
                        .filter(this::doubleCheck)
 | 
			
		||||
                        .collect(Collectors.toList());
 | 
			
		||||
 | 
			
		||||
                checkedToDelete
 | 
			
		||||
                        .stream()
 | 
			
		||||
                        .forEach(this.orientationRecordMapper::deleteByPrimaryKey);
 | 
			
		||||
                return "Fixed duplicates by deletion: " + checkedToDelete + " from findings:" + toDelete;
 | 
			
		||||
                return "Fixed duplicates by deletion: " + checkedToDelete;
 | 
			
		||||
            } else {
 | 
			
		||||
                return "Found duplicates: " + toDelete;
 | 
			
		||||
                return "Found duplicates: " + checkedToDelete;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        });
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue