From c486330ec19354057624e7ecfcaa99ce5fb56246 Mon Sep 17 00:00:00 2001 From: "Bruce W. Herr II" Date: Mon, 4 Dec 2023 16:55:54 -0500 Subject: [PATCH] When updating db, load draft into a type/name/draft graph name. --- src/deployment/utils.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/deployment/utils.js b/src/deployment/utils.js index 203943c..f9f9f0b 100644 --- a/src/deployment/utils.js +++ b/src/deployment/utils.js @@ -3,7 +3,7 @@ import { load } from '../utils/blazegraph.js'; export function loadDoIntoTripleStore(context, journalPath) { const obj = context.selectedDigitalObject; - const graph = obj.iri; + const graph = obj.iri + (obj.version === 'draft' ? '/draft' : ''); const data = resolve(obj.path, 'enriched/enriched.ttl'); load(graph, data, journalPath); } @@ -17,7 +17,7 @@ export function loadMetadataIntoTripleStore(context, journalPath) { export function loadRedundantIntoTripleStore(context, journalPath) { const obj = context.selectedDigitalObject; - const graph = `${obj.iri}/redundant`; + const graph = `${obj.iri}${obj.version === 'draft' ? '/draft' : ''}/redundant`; const data = resolve(obj.path, 'enriched/redundant.ttl'); load(graph, data, journalPath); -} \ No newline at end of file +}