Skip to content

Commit 4f8cc7c

Browse files
committed
Fixed retrieval of non existing values in getSingleReferenceValue
1 parent a1fc05d commit 4f8cc7c

File tree

1 file changed

+1
-1
lines changed
  • kotlin-insight-client/kotlin-insight-client-api/src/main/kotlin/com/linkedplanet/kotlininsightclient/api/model

1 file changed

+1
-1
lines changed

kotlin-insight-client/kotlin-insight-client-api/src/main/kotlin/com/linkedplanet/kotlininsightclient/api/model/Model.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ fun InsightObject.getDateTimeValue(id: Int): ZonedDateTime? =
153153
fun InsightObject.getSingleReferenceValue(id: Int): InsightReference? =
154154
getAttribute(id)
155155
?.value
156-
?.single()
156+
?.firstOrNull()
157157
?.referencedObject
158158
?.let {
159159
InsightReference(

0 commit comments

Comments
 (0)