Skip to content

Commit

Permalink
Update crosswalk logic
Browse files Browse the repository at this point in the history
  • Loading branch information
bherr2 committed Jun 4, 2024
1 parent 0957d2b commit ad7ba27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/update-collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function updateCollection(context) {
const refOrgans = updated.filter((d) => d !== refOrganCrosswalk && d.startsWith('ref-organ/'));

for (const refOrgan of refOrgans) {
console.log(`Updating crosswalk for ${refOrgan}`);
console.log(`Updating crosswalk for ${refOrgan} using ${refOrganCrosswalk}`);
await updateRefOrganCrosswalk({
...context,
selectedDigitalObject: getDigitalObjectInformation(resolve(context.doHome, refOrgan), context.purlIri),
Expand Down
4 changes: 2 additions & 2 deletions src/update-ref-organ-crosswalk.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ export async function updateRefOrganCrosswalk(context) {
function subsetCrosswalk(crosswalkRows, gltf) {
const results = [];
for (const node of gltf.nodes) {
const row = crosswalkRows.find((n) => (n.node_name = node.name));
const row = crosswalkRows.find((n) => (n.node_name === node.name));
if (row) {
results.push({
node_name: node.name,
OntologyID: row.OntologyID,
label: row.label,
});
} else if (node.extras?.ontologyid) {
} else if (node.extras?.ontologyid && node.extras.ontologyid !== '-') {
results.push({
node_name: node.name,
OntologyID: node.extras.ontologyid,
Expand Down

0 comments on commit ad7ba27

Please sign in to comment.