Skip to content

Commit

Permalink
Fix when no shacl errors
Browse files Browse the repository at this point in the history
  • Loading branch information
avillar committed Aug 28, 2024
1 parent a625ac7 commit 1ae769f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion data/chek-profiles.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ chekp:dummy a prof:Profile, chekp:Profile ;
.

chekp:roads-present a prof:Profile, chekp:Profile ;
dct:title "Green public spaces present" ;
dct:title "Roads present" ;
dct:description "This profile checks that roads are present in at least one dataset" ;
dct:hasVersion "0.1" ;
prof:isProfileOf chekp:chek ;
Expand Down
22 changes: 12 additions & 10 deletions static/js/vue/CheckForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -363,17 +363,19 @@ export default {
const shaclReport = this.results.content.shaclReport;
const val3dityReports = this.results.content.fileValidation;
for (const failedShape of shaclReport.result) {
let msg = `${failedShape.resultMessage} (${jsonldToString(failedShape.sourceShape)}`;
if (failedShape.focusNode !== CHEK_DOCUMENT_URI) {
msg += `for ${jsonldToString(failedShape.focusNode)}`;
}
msg += failedShape.value !== CHEK_DOCUMENT_URI ? `, value ${jsonldToString(failedShape.value)})` : ')';
if (shaclReport.result?.length) {
for (const failedShape of shaclReport.result) {
let msg = `${failedShape.resultMessage} (${jsonldToString(failedShape.sourceShape)}`;
if (failedShape.focusNode !== CHEK_DOCUMENT_URI) {
msg += `for ${jsonldToString(failedShape.focusNode)}`;
}
msg += failedShape.value !== CHEK_DOCUMENT_URI ? `, value ${jsonldToString(failedShape.value)})` : ')';
result.push({
type: 'SHACL',
message: msg,
})
result.push({
type: 'SHACL',
message: msg,
})
}
}
if (!this.results.content.val3dityResult) {
Expand Down

0 comments on commit 1ae769f

Please sign in to comment.