Skip to content

Commit

Permalink
More cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gloverkari committed Nov 28, 2023
1 parent a652774 commit e8f93b2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/main/server/adapter/asn/asn.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,10 +536,8 @@ async function importConceptPromise(graphObj, conceptSchemeId, context, skosIden
else {
url = "https://schema.cassproject.org/0.4/";
}
compacted = await jsonLdCompact(JSON.stringify(expanded), url);

const type = compacted["@type"]
let objToSave = compacted;
let objToSave = await jsonLdCompact(JSON.stringify(expanded), url);
const type = objToSave["@type"]

if ((type == "skos:ConceptScheme") || (type == "asn:ProgressionModel")) {
objToSave["@type"] = "ConceptScheme";
Expand All @@ -548,7 +546,7 @@ async function importConceptPromise(graphObj, conceptSchemeId, context, skosIden
objToSave["subType"] = "Progression";
}
objToSave = new EcConceptScheme();
objToSave.copyFrom(compacted);
objToSave.copyFrom(compacted);
conceptSchemeId.push(objToSave.shortId());
objToSave.addOwner(skosIdentity.ppk.toPk());
if (owner != null)
Expand Down

0 comments on commit e8f93b2

Please sign in to comment.