Skip to content

Commit

Permalink
fix 500 error when withdrawing sometimes
Browse files Browse the repository at this point in the history
  • Loading branch information
eroux committed Feb 12, 2023
1 parent e85fbff commit c845376
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public Resource update_references(final Resource from, final Resource to, final
}

public List<Resource> get_graphs_with_reference_to(final Resource r) {
final String sparqlStr = "select distinct ?g { ?adm <"+ModelUtils.admAbout.getURI()+"> <"+r.getURI()+"> ; <"+ModelUtils.admGraphId.getURI()+"> ?thisg . graph ?g { ?s ?p <"+r.getURI()+"> } FILTER(?g != ?thisg) }";
final String sparqlStr = "select distinct ?g { ?adm <"+ModelUtils.admAbout.getURI()+"> <"+r.getURI()+"> ; <"+ModelUtils.admGraphId.getURI()+"> ?thisg . graph ?g { ?s ?p <"+r.getURI()+"> FILTER(EXISTS{?a <"+ModelUtils.admGitPath.getURI()+"> ?b}) } FILTER(?g != ?thisg) }";
ResultSet rs = QueryProcessor.getSelectResultSet(sparqlStr, FusekiWriteHelpers.FusekiSparqlEndpoint);
final List<Resource> res = new ArrayList<>();
while (rs.hasNext()) {
Expand All @@ -121,7 +121,7 @@ public List<Resource> get_graphs_with_reference_to(final Resource r) {
}

@PostMapping(value = "/withdraw")
public synchronized ResponseEntity<List<String>> syncImageGroup(
public synchronized ResponseEntity<List<String>> withdraw(
@RequestParam(value = "from") String from_qname,
@RequestParam(value = "to") String to_qname,
HttpServletRequest req,
Expand Down
1 change: 1 addition & 0 deletions src/main/java/io/bdrc/edit/helpers/ModelUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ public static Model getValidFocusGraph(final Model inModel, final Resource r, fi
public static final Property admAbout = ResourceFactory.createProperty(Models.ADM, "adminAbout");
public static final Property admReplaceWith = ResourceFactory.createProperty(Models.ADM, "replaceWith");
public static final Property admGraphId = ResourceFactory.createProperty(Models.ADM, "graphId");
public static final Property admGitPath = ResourceFactory.createProperty(Models.ADM, "gitPath");
public static final Property admStatus = ResourceFactory.createProperty(Models.ADM, "status");
public static final Property StatusReleased = ResourceFactory.createProperty(Models.BDA, "StatusReleased");
public static final Property StatusWithdrawn = ResourceFactory.createProperty(Models.BDA, "StatusWithdrawn");
Expand Down

0 comments on commit c845376

Please sign in to comment.