From 5ef5b36233c59e3bee820ae644f7bdc1fdb158df Mon Sep 17 00:00:00 2001 From: Jan Forberg Date: Wed, 7 Feb 2024 09:34:27 +0100 Subject: [PATCH] duplicate artifact displayed on account page fix --- .../queries/sparql/get-artifacts-by-account.sparql | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/server/app/common/queries/sparql/get-artifacts-by-account.sparql b/server/app/common/queries/sparql/get-artifacts-by-account.sparql index fed57cc..250e8bf 100644 --- a/server/app/common/queries/sparql/get-artifacts-by-account.sparql +++ b/server/app/common/queries/sparql/get-artifacts-by-account.sparql @@ -7,11 +7,17 @@ PREFIX rdfs: SELECT DISTINCT ?artifact as ?uri ?title ?abstract ?description WHERE { - GRAPH ?g { - ?artifact a databus:Artifact . - ?artifact databus:account <%ACCOUNT_URI%> . + { + SELECT DISTINCT ?artifact WHERE { + GRAPH ?g1 { + ?artifact a databus:Artifact . + ?artifact databus:account <%ACCOUNT_URI%> . + } + } + } + GRAPH ?g2 { OPTIONAL { ?artifact dct:title ?title . } OPTIONAL { ?artifact dct:abstract ?abstract . } OPTIONAL { ?artifact dct:description ?description . } } -} \ No newline at end of file +}