This is an automated email from the ASF dual-hosted git repository.

weizhou pushed a commit to branch 4.18
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.18 by this push:
     new d9588822828 server: get id from persisted object ReservationVO (#7785)
d9588822828 is described below

commit d9588822828630e69e3babec904a5809454602cb
Author: dahn <[email protected]>
AuthorDate: Fri Jul 28 05:16:33 2023 +0200

    server: get id from persisted object ReservationVO (#7785)
---
 server/src/main/java/com/cloud/resourcelimit/CheckedReservation.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/server/src/main/java/com/cloud/resourcelimit/CheckedReservation.java 
b/server/src/main/java/com/cloud/resourcelimit/CheckedReservation.java
index d0c20a3a7af..5650af15339 100644
--- a/server/src/main/java/com/cloud/resourcelimit/CheckedReservation.java
+++ b/server/src/main/java/com/cloud/resourcelimit/CheckedReservation.java
@@ -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 {

Reply via email to