Skip to content

Commit

Permalink
clonestack: add toOwner as query parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
RussTorres committed Nov 7, 2017
1 parent 512e4dd commit 180eda5
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ public Response cloneStackVersion(@PathParam("owner") final String owner,
@PathParam("toStack") final String toStack,
@QueryParam("z") final List<Double> zValues,
@QueryParam("toProject") String toProject,
@QueryParam("toOwner") String toOwner,
@QueryParam("skipTransforms") final Boolean skipTransforms,
@Context final UriInfo uriInfo,
final StackVersion stackVersion) {
Expand All @@ -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);

Expand Down

1 comment on commit 180eda5

@RussTorres
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be relevant to part of AllenInstitute/render-python#49

Please sign in to comment.