Skip to content

Commit d958882

Browse files
authored
server: get id from persisted object ReservationVO (#7785)
1 parent 01e5c25 commit d958882

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/com/cloud/resourcelimit/CheckedReservation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public CheckedReservation(Account account, ResourceType resourceType, Long amoun
7676
resourceLimitService.checkResourceLimit(account,resourceType,amount);
7777
ReservationVO reservationVO = new ReservationVO(account.getAccountId(), account.getDomainId(), resourceType, amount);
7878
this.reservation = reservationDao.persist(reservationVO);
79-
CallContext.current().putContextParameter(getContextParameterKey(), reservationVO.getId());
79+
CallContext.current().putContextParameter(getContextParameterKey(), reservation.getId());
8080
} catch (NullPointerException npe) {
8181
throw new CloudRuntimeException("not enough means to check limits", npe);
8282
} finally {

0 commit comments

Comments
 (0)