Skip to content

Commit b96eea9

Browse files
committed
Undo behavior, if not destination graph is given
1 parent 146d834 commit b96eea9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

quit/tools/update.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,8 @@ def evalLoad(ctx, u):
5656
res["source"] = u.iri
5757
res["delta"] = {}
5858

59-
graphiri = u.graphiri
6059
if not u.graphiri:
61-
graphiri = u.iri
60+
raise UnSupportedQuery("For load queries we need a iriref for a target graph")
6261

6362
success = False
6463
loadedGraph = None
@@ -80,10 +79,10 @@ def evalLoad(ctx, u):
8079
"Could not load %s as either RDF/XML, N3, Turtle, or NTriples" % (
8180
u.iri))
8281

83-
graph = ctx.dataset.get_context(graphiri)
82+
graph = ctx.dataset.get_context(u.graphiri)
8483
graph += loadedGraph
8584

86-
_append(res["delta"], graphiri, 'additions', loadedGraph)
85+
_append(res["delta"], u.graphiri, 'additions', loadedGraph)
8786

8887
return res
8988

0 commit comments

Comments
 (0)