mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
server: get id from persisted object ReservationVO (#7785)
This commit is contained in:
parent
01e5c25523
commit
d958882282
@ -76,7 +76,7 @@ public class CheckedReservation implements AutoCloseable, ResourceReservation {
|
||||
resourceLimitService.checkResourceLimit(account,resourceType,amount);
|
||||
ReservationVO reservationVO = new ReservationVO(account.getAccountId(), account.getDomainId(), resourceType, amount);
|
||||
this.reservation = reservationDao.persist(reservationVO);
|
||||
CallContext.current().putContextParameter(getContextParameterKey(), reservationVO.getId());
|
||||
CallContext.current().putContextParameter(getContextParameterKey(), reservation.getId());
|
||||
} catch (NullPointerException npe) {
|
||||
throw new CloudRuntimeException("not enough means to check limits", npe);
|
||||
} finally {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user