From d928b624a1235a6f5a7de09f747748c1a04d9710 Mon Sep 17 00:00:00 2001 From: ranim-n Date: Fri, 6 Sep 2024 17:43:58 +0200 Subject: [PATCH] minor fix --- .../egm/stellio/subscription/service/SubscriptionService.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subscription-service/src/main/kotlin/com/egm/stellio/subscription/service/SubscriptionService.kt b/subscription-service/src/main/kotlin/com/egm/stellio/subscription/service/SubscriptionService.kt index b2246fe21..5063d3383 100644 --- a/subscription-service/src/main/kotlin/com/egm/stellio/subscription/service/SubscriptionService.kt +++ b/subscription-service/src/main/kotlin/com/egm/stellio/subscription/service/SubscriptionService.kt @@ -295,12 +295,12 @@ class SubscriptionService( fun getContextsLink(subscription: Subscription): String { val contextLink = when { - subscription.contexts.size > 1 && subscription.jsonldContext == null -> { + subscription.jsonldContext != null -> subscription.jsonldContext.toString() + subscription.contexts.size > 1 -> { val linkToRetrieveContexts = subscriptionProperties.stellioUrl + "/ngsi-ld/v1/subscriptions/${subscription.id}/context" linkToRetrieveContexts } - subscription.jsonldContext != null -> subscription.jsonldContext.toString() else -> subscription.contexts[0] } return buildContextLinkHeader(contextLink)