diff --git a/render-ws/src/main/java/org/janelia/render/service/StackMetaDataService.java b/render-ws/src/main/java/org/janelia/render/service/StackMetaDataService.java index fb42db351..98bba4a9d 100644 --- a/render-ws/src/main/java/org/janelia/render/service/StackMetaDataService.java +++ b/render-ws/src/main/java/org/janelia/render/service/StackMetaDataService.java @@ -269,6 +269,7 @@ public Response cloneStackVersion(@PathParam("owner") final String owner, @PathParam("toStack") final String toStack, @QueryParam("z") final List zValues, @QueryParam("toProject") String toProject, + @QueryParam("toOwner") String toOwner, @QueryParam("skipTransforms") final Boolean skipTransforms, @Context final UriInfo uriInfo, final StackVersion stackVersion) { @@ -285,8 +286,12 @@ public Response cloneStackVersion(@PathParam("owner") final String owner, toProject = fromProject; } + if (toOwner == null) { + toOwner = owner; + } + final StackMetaData fromStackMetaData = getStackMetaData(owner, fromProject, fromStack); - final StackId toStackId = new StackId(owner, toProject, toStack); + final StackId toStackId = new StackId(toOwner, toProject, toStack); StackMetaData toStackMetaData = renderDao.getStackMetaData(toStackId);