fix(api): collection without element would return incorrect dto

This commit is contained in:
Gauthier Roebroeck 2020-06-26 10:45:42 +08:00
parent 78eba89733
commit 08919814d3

View file

@ -92,7 +92,7 @@ class SeriesCollectionDao(
private fun ResultQuery<Record>.fetchAndMap() =
fetchGroups({ it.into(c) }, { it.into(cs) })
.map { (cr, csr) ->
val seriesIds = csr.map { it.seriesId }
val seriesIds = csr.mapNotNull { it.seriesId }
cr.toDomain(seriesIds)
}