Skip to content

Commit b63b5e4

Browse files
committed
[DSC-1021] fix issue with doubled request
1 parent f944d07 commit b63b5e4

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

  • src/app/cris-layout/cris-layout-matrix/cris-layout-box-container/boxes/metadata/rendering-types/valuepair

src/app/cris-layout/cris-layout-matrix/cris-layout-box-container/boxes/metadata/rendering-types/valuepair/valuepair.component.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,9 @@ export class ValuepairComponent extends RenderingTypeValueModelComponent impleme
5252
const authority = this.metadataValue.authority ? this.metadataValue.authority.split(':') : undefined;
5353
const isControlledVocabulary = authority?.length > 1 && authority[0] === vocabularyName;
5454

55-
let vocabularyEntry$ =
55+
let vocabularyEntry$ = isControlledVocabulary ?
56+
this.vocabularyService.getPublicVocabularyEntryByID(vocabularyName, this.metadataValue.authority) :
5657
this.vocabularyService.getPublicVocabularyEntryByValue(vocabularyName, this.metadataValue.value);
57-
if (!!isControlledVocabulary) {
58-
vocabularyEntry$ =
59-
this.vocabularyService.getPublicVocabularyEntryByID(vocabularyName, this.metadataValue.authority);
60-
}
6158

6259
vocabularyEntry$.pipe(
6360
getFirstCompletedRemoteData(),

0 commit comments

Comments
 (0)