weizhouapache commented on issue #8259:
URL: https://github.com/apache/cloudstack/issues/8259#issuecomment-1827720502

   > > > vpnUser
   > > 
   > > 
   > > @DaanHoogland I've noticed the following code, do you mean the object is 
empty ?
   > > ```
   > >         VpnUser vpnUser = _entityMgr.findById(VpnUser.class, 
getEntityId());
   > > ```
   > 
   > At the moment the service method `applyVpnUsers(long vpnOwnerId, String 
userName)` returns a `boolean` and not a `VpnUser` object to the Cmd.execute 
method, where the response object is filled. No big deal, but either we'll have 
to change that or we have to retrieve the object again after the call to 
`applyVpnUsers`. It calls `boolean applyVpnUsers(long vpnOwner Id, String 
userName, boolean forRemove)` which in turn does not create the VpnUser object 
explicitely. The state of the object may be stale due to that and the VpnUser 
retrieved in that statement is historic. A solution would be to retrieve it 
anew, but I do not think that is the most elegant or cost effective solution. 
Again, not a big deal, but also not a big priority.
   
   @DaanHoogland 
   you are right. the vpnuser needs to be re-retrieved. :+1: 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to