RED-9375: fix component mapping endpoint validation
This commit is contained in:
parent
5dd27f682b
commit
1a585e9fe3
@ -140,6 +140,10 @@ public class ComponentMappingService {
|
||||
|
||||
columnLabels = rows.remove(0); // remove header row
|
||||
|
||||
if (Arrays.stream(columnLabels).distinct().count() < columnLabels.length) {
|
||||
throw new BadRequestException("Column labels may not contain duplicates!");
|
||||
}
|
||||
|
||||
numberOfLines = (int) reader.getLinesRead() - 1; // subtract header row
|
||||
|
||||
rows.sort(CSV_SORTER);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user