Skip to content

Commit

Permalink
Merge pull request #638 from alan-wu/gallery-to-maps
Browse files Browse the repository at this point in the history
QA fix: Make sure body proper is ignored when opening the flatmap.
  • Loading branch information
alan-wu authored Mar 7, 2023
2 parents 64e91e4 + 4b21fea commit 1762d67
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion pages/maps/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,27 @@ import { successMessage, failMessage } from '@/utils/notification-messages'
const getFlatmapEntry = async ( route ) => {
const uberonid = route.query.uberonid
let organ_name = undefined
//Specify the gender of human
let biologicalSex = route.query.biologicalSex
if (route.query.taxo && route.query.taxo === "NCBITaxon:9606") {
if (!biologicalSex) {
biologicalSex = "PATO:0000384"
}
}
try {
organ_name = await scicrunch.getOrganFromUberonId(uberonid)
//We do not want to display the body proper
if (organ_name && organ_name.toLowerCase() === "body proper") {
organ_name = undefined
}
} catch (e) {
// Error caught return empty data.
}
return {
type: "MultiFlatmap",
taxo: route.query.taxo,
biologicalSex: route.query.biologicalSex,
biologicalSex: biologicalSex,
uuid: route.query.fid,
organ: organ_name
}
Expand Down

0 comments on commit 1762d67

Please sign in to comment.