Merge "Make PUT on /projects/<name>/parent return the new parent name"
This commit is contained in:
@@ -54,7 +54,7 @@ class SetParent implements RestModifyView<ProjectResource, Input> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object apply(ProjectResource resource, Input input)
|
public String apply(ProjectResource resource, Input input)
|
||||||
throws AuthException, BadRequestException, ResourceConflictException,
|
throws AuthException, BadRequestException, ResourceConflictException,
|
||||||
Exception {
|
Exception {
|
||||||
ProjectControl ctl = resource.getControl();
|
ProjectControl ctl = resource.getControl();
|
||||||
@@ -83,11 +83,8 @@ class SetParent implements RestModifyView<ProjectResource, Input> {
|
|||||||
config.commit(md);
|
config.commit(md);
|
||||||
cache.evict(ctl.getProject());
|
cache.evict(ctl.getProject());
|
||||||
|
|
||||||
ListProjects.ProjectInfo info = new ListProjects.ProjectInfo();
|
Project.NameKey parentName = project.getParent(allProjects);
|
||||||
info.setName(resource.getName());
|
return parentName != null ? parentName.get() : "";
|
||||||
info.parent = project.getParentName();
|
|
||||||
info.description = project.getDescription();
|
|
||||||
return info;
|
|
||||||
} finally {
|
} finally {
|
||||||
md.close();
|
md.close();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user