Skip to content

Commit

Permalink
fix NPE in EnBwAvailabilityDetector
Browse files Browse the repository at this point in the history
  • Loading branch information
johan12345 committed Jul 14, 2023
1 parent 10e3287 commit 2a4497f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ class EnBwAvailabilityDetector(client: OkHttpClient, baseUrl: String? = null) :
markers = listOf(nearest)
}

val details = markers.map {
val details = markers.mapNotNull { it.stationId }.map {
// load details
api.getLocation(it.stationId!!)
api.getLocation(it)
}

val connectorStatus = details.flatMap { it.chargePoints }.flatMap { cp ->
Expand Down

0 comments on commit 2a4497f

Please sign in to comment.