Skip to content

Commit

Permalink
fix(website): Fix revocation entry bug (#2402)
Browse files Browse the repository at this point in the history
* Fix revocation entry bug

---------

Co-authored-by: Loculus bot <[email protected]>
  • Loading branch information
anna-parker and Loculus bot authored Aug 9, 2024
1 parent b1ad460 commit 0b4bb5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ import {
DATA_USE_TERMS_FIELD,
} from '../../settings';
import { type DataUseTermsHistoryEntry } from '../../types/backend';
import { getReferenceGenomesSequenceNames } from '../../utils/search';
import { cleanOrganism } from '../Navigation/cleanOrganism';
import type { ReferenceGenomesSequenceNames } from '../../types/referencesGenomes';
interface Props {
tableData: TableDataEntry[];
dataUseTermsHistory: DataUseTermsHistoryEntry[];
referenceGenomeSequenceNames: ReferenceGenomesSequenceNames;
}
const { tableData, dataUseTermsHistory } = Astro.props;
const { tableData, dataUseTermsHistory, referenceGenomeSequenceNames } = Astro.props;
const relevantFieldsForRevocationVersions = [
ACCESSION_VERSION_FIELD,
Expand All @@ -42,15 +42,6 @@ const relevantFieldsForRevocationVersions = [
const relevantData = tableData.filter((entry) => relevantFieldsForRevocationVersions.includes(entry.name));
const dataTableData = getDataTableData(relevantData);
const { organism: cleanedOrganism } = cleanOrganism(Astro.params.organism);
if (!cleanedOrganism) {
return {
statusCode: 404,
body: 'Organism not found',
};
}
const referenceGenomeSequenceNames = getReferenceGenomesSequenceNames(cleanedOrganism.key);
const reference = referenceGenomeSequenceNames.insdc_accession_full;
---
Expand Down
1 change: 1 addition & 0 deletions website/src/pages/seq/[accessionVersion]/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const runtimeConfig = getRuntimeConfig();
<RevocationEntryDataTable
tableData={result.tableData}
dataUseTermsHistory={result.dataUseTermsHistory}
referenceGenomeSequenceNames={getReferenceGenomesSequenceNames(organism)}
/>
) : (
<SequenceDataUI
Expand Down

0 comments on commit 0b4bb5d

Please sign in to comment.