diff --git a/src/atlasComponents/connectivity/hasConnectivity.directive.ts b/src/atlasComponents/connectivity/hasConnectivity.directive.ts index c547b715a7dfb5c7937ea8b7233199a790976333..b3cf77233d0a1a991722b42876cc38c60c7834ca 100644 --- a/src/atlasComponents/connectivity/hasConnectivity.directive.ts +++ b/src/atlasComponents/connectivity/hasConnectivity.directive.ts @@ -3,7 +3,6 @@ import {of, Subscription} from "rxjs"; import {switchMap} from "rxjs/operators"; import {BS_ENDPOINT} from "src/util/constants"; import {HttpClient} from "@angular/common/http"; -import {getIdFromKgIdObj} from "common/util"; @Directive({ selector: '[has-connectivity]', @@ -28,11 +27,8 @@ export class HasConnectivity implements OnInit, OnDestroy { checkConnectivity(region) { const {atlas, parcellation, template} = region.context - if (region.id || region.name) { - const regionId = region.id? region.id.kg? getIdFromKgIdObj(region.id.kg) - : region.id : null - - const connectivityUrl = `${this.siibraApiUrl}/atlases/${encodeURIComponent(atlas['@id'])}/parcellations/${encodeURIComponent(parcellation['@id'])}/regions/${encodeURIComponent(regionId || region.name)}/features/ConnectivityProfile` + if (region.name) { + const connectivityUrl = `${this.siibraApiUrl}/atlases/${encodeURIComponent(atlas['@id'])}/parcellations/${encodeURIComponent(parcellation['@id'])}/regions/${encodeURIComponent(region.name)}/features/ConnectivityProfile` this.subscriptions.push( this.httpClient.get<[]>(connectivityUrl).pipe(switchMap((res: any[]) => {