Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not include missing competencies in ceasn json export #285

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/main/server/adapter/ceasn/ceasn.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async function competencyPromise(compId, competencies, allCompetencies, f, ctx,
try {
var c = competencies[compId];
if (!c) {
resolve(compId);
resolve(null);
return;
}
if (c == null) resolve(c);
Expand Down Expand Up @@ -399,11 +399,7 @@ async function cassFrameworkAsCeasn() {
};
}
for (let c of competencies) {
if (!c["@id"]) {
// URI does not reference a valid competency.
// For consistency with the data and possible debugging purposes, it should still be included in JSON-LD export
f["ceasn:hasTopChild"]["@list"].push(await ceasnExportUriTransform(c));
} else {
if (c && c["@id"]) {
if (!c["ceasn:isChildOf"] || c["ceasn:isChildOf"] == null) {
f["ceasn:hasTopChild"]["@list"].push(await ceasnExportUriTransform(c["@id"]));
}
Expand Down
Loading