Skip to content

Commit 71f127a

Browse files
committed
fix logic used to obtain and register entity UUID
1 parent 4522459 commit 71f127a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/src/main/java/com/cloud/api/dispatch/ParamProcessWorker.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import org.apache.cloudstack.api.BaseCmd;
4444
import org.apache.cloudstack.api.BaseCmd.CommandType;
4545
import org.apache.cloudstack.api.EntityReference;
46+
import org.apache.cloudstack.api.Identity;
4647
import org.apache.cloudstack.api.InternalIdentity;
4748
import org.apache.cloudstack.api.Parameter;
4849
import org.apache.cloudstack.api.ServerApiException;
@@ -532,11 +533,11 @@ private Long translateUuidToInternalId(final String uuid, final Parameter annota
532533
// Populate CallContext for each of the entity.
533534
for (final Class<?> entity : entities) {
534535
CallContext.current().putContextParameter(entity, internalId);
535-
final Object objVO = _entityMgr.findByUuidIncludingRemoved(entity, uuid);
536+
final Object objVO = _entityMgr.findByIdIncludingRemoved(entity, internalId);
536537
if (objVO == null) {
537538
continue;
538539
}
539-
CallContext.current().putApiResourceUuid(annotation.name(), uuid);
540+
CallContext.current().putApiResourceUuid(annotation.name(), ((Identity) objVO).getUuid());
540541
}
541542
validateNaturalNumber(internalId, annotation.name());
542543
return internalId;

0 commit comments

Comments
 (0)