Skip to content

Commit

Permalink
Unintelligent hack for disabling all traces of compact relationship
Browse files Browse the repository at this point in the history
  • Loading branch information
bindeali committed May 30, 2024
1 parent ba5a3d4 commit d30ccdb
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/interface/ContextInterface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,24 @@ export async function retrieveContextData(): Promise<boolean> {
`Link ID ${id} ( ${WorkspaceLinks[id].source} -- ${WorkspaceLinks[id].iri} -> ${WorkspaceLinks[id].target} ) deactivated due to its statement counterpart(s) missing.`
);
WorkspaceLinks[id].active = false;
// Really poorly thought out hack!
if (
WorkspaceLinks[id].iri ===
parsePrefix("z-sgov-pojem", "má-vztažený-prvek-1") ||
WorkspaceLinks[id].iri ===
parsePrefix("z-sgov-pojem", "má-vztažený-prvek-2")
) {
const relElem = WorkspaceLinks[id].source;
const relLink = Object.keys(WorkspaceLinks).find(
(id) => WorkspaceLinks[id].iri === relElem
);
if (relLink) {
console.warn(
`Link ID ${relLink} ( ${WorkspaceLinks[relLink].source} -- ${WorkspaceLinks[relLink].iri} -> ${WorkspaceLinks[relLink].target} ) deactivated due to its statement counterpart(s) missing.`
);
WorkspaceLinks[relLink].active = false;
}
}
}
return await processTransaction(
AppSettings.contextEndpoint,
Expand Down

0 comments on commit d30ccdb

Please sign in to comment.