feat(server/gtfs): only display conflicting duplicates during import

This commit is contained in:
Cilly Leang 2025-12-19 19:20:01 +11:00
parent 5535034fd7
commit 32f6e415e1
Signed by: cilly
GPG key ID: 6500251E087653C9

View file

@ -150,9 +150,10 @@ class GtfsHandler(
.groupBy { it.id }
.forEach { (id, gstops) ->
if (gstops.size > 1) {
// if (gstops.withIndex().any { (i, stop) -> i != 0 && stop == gstops[i - 1] })
gstops.forEach {
log.info("duplicate $id: $it")
if (gstops.withIndex().any { (i, stop) -> i != 0 && stop != gstops[i - 1] }) {
gstops.forEach {
log.info("duplicate $id: $it")
}
}
}
}