Skip to content

Commit

Permalink
DIGG-506: Adding fix for getting the correct publisher on terminology…
Browse files Browse the repository at this point in the history
… and concepts
  • Loading branch information
MikaMunterud committed Dec 19, 2024
1 parent 6a556b9 commit 33e5f5d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion providers/entrystore-provider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,21 @@ export const EntrystoreProvider: FC<EntrystoreProviderProps> = ({
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<ESEntry> = {
Expand Down

0 comments on commit 33e5f5d

Please sign in to comment.