mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
bug 10539: use TemplateResponse object instead of ListResponse in copyTemplate api
status 10539: resolved fixed
This commit is contained in:
parent
17f785f07a
commit
22bf622359
@ -120,9 +120,12 @@ public class CopyTemplateCmd extends BaseAsyncCmd {
|
||||
VirtualMachineTemplate template = _templateService.copyTemplate(this);
|
||||
|
||||
if (template != null){
|
||||
ListResponse<TemplateResponse> response = new ListResponse<TemplateResponse>();
|
||||
List<TemplateResponse> templateResponses = _responseGenerator.createTemplateResponses(template.getId(), getDestinationZoneId(), false);
|
||||
response.setResponses(templateResponses);
|
||||
List<TemplateResponse> listResponse = _responseGenerator.createTemplateResponses(template.getId(), getDestinationZoneId(), false);
|
||||
TemplateResponse response = new TemplateResponse();
|
||||
if (listResponse != null && !listResponse.isEmpty()) {
|
||||
response = listResponse.get(0);
|
||||
}
|
||||
|
||||
response.setResponseName(getCommandName());
|
||||
this.setResponseObject(response);
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user