Skip to content

Commit

Permalink
fix: Return on post seems to miss information (TT-1481)
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusLevang committed Feb 29, 2024
1 parent 2befa6f commit c1cc457
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import no.nb.bikube.catalogue.collections.exception.*
import no.nb.bikube.catalogue.collections.mapper.*
import no.nb.bikube.catalogue.collections.model.*
import no.nb.bikube.catalogue.collections.model.dto.*
import no.nb.bikube.catalogue.collections.repository.CollectionsRepository
import no.nb.bikube.core.enum.*
import no.nb.bikube.core.exception.*
import no.nb.bikube.core.model.*
import no.nb.bikube.core.model.inputDto.ItemInputDto
import no.nb.bikube.core.model.inputDto.TitleInputDto
import no.nb.bikube.catalogue.collections.repository.CollectionsRepository
import org.springframework.stereotype.Service
import reactor.core.publisher.Flux
import reactor.core.publisher.Mono
Expand All @@ -35,7 +35,7 @@ class NewspaperService (
?. let { sink.next(collectionsModel.adlibJson.recordList) }
?: sink.error(CollectionsTitleNotFound("New title not found"))
}
.map { mapCollectionsObjectToGenericTitle(it.first()) }
.flatMap { getSingleTitle(it.first().priRef) }
}

@Throws(CollectionsException::class)
Expand Down Expand Up @@ -244,7 +244,7 @@ class NewspaperService (
collectionsModel.getObjects()
?. let { sink.next(collectionsModel.getObjects()) }
?: sink.error(CollectionsItemNotFound("New item not found"))
}.map { mapCollectionsObjectToGenericItem(it!!.first()) }
}.flatMap { getSingleItem(it!!.first().priRef) }
}

private fun findOrCreateManifestationRecord(
Expand Down

0 comments on commit c1cc457

Please sign in to comment.