From 33e5f5debdd90fadf50bc3f94f4d14fb34a724a8 Mon Sep 17 00:00:00 2001 From: Mika Munterud Date: Thu, 19 Dec 2024 11:17:58 +0100 Subject: [PATCH] DIGG-506: Adding fix for getting the correct publisher on terminology and concepts --- providers/entrystore-provider/index.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/providers/entrystore-provider/index.tsx b/providers/entrystore-provider/index.tsx index dbc9bf67..501482d4 100644 --- a/providers/entrystore-provider/index.tsx +++ b/providers/entrystore-provider/index.tsx @@ -111,9 +111,21 @@ export const EntrystoreProvider: FC = ({ const resourceUri = entry.getResourceURI(); // Parallel fetch for publisher info + // TODO: Remove this when concepts and terminologies are moved to admin.dataportal.se + const publisherEntrystoreService = + pageType === "concept" || pageType === "terminology" + ? EntrystoreService.getInstance({ + baseUrl: `https://admin.dataportal.se/store`, + lang, + t, + }) + : entrystoreService; const publisherPromise = pageType !== "mqa" - ? await entrystoreService.getPublisherInfo(resourceUri, metadata) + ? await publisherEntrystoreService.getPublisherInfo( + resourceUri, + metadata, + ) : Promise.resolve({ name: "", entry: null }); const entryData: Partial = {