mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-3485: NPE while getting instance ID from Asyn Job when
publishing async job events on eventbus handing case where instance id is null in the asyn job, while publishing asyn job events on to event bus
This commit is contained in:
parent
22c6df0ba2
commit
f3a2fc22bf
|
|
@ -1279,9 +1279,11 @@ public class ApiDBUtils {
|
|||
}
|
||||
|
||||
public static String findJobInstanceUuid(AsyncJob job){
|
||||
if ( job == null )
|
||||
if ( job == null || job.getInstanceId() == null)
|
||||
return null;
|
||||
|
||||
String jobInstanceId = null;
|
||||
|
||||
if (job.getInstanceType() == AsyncJob.Type.Volume) {
|
||||
VolumeVO volume = ApiDBUtils.findVolumeById(job.getInstanceId());
|
||||
if (volume != null) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue