@@ -738,13 +738,14 @@ public void sendAlert(AlertType alertType, DataCenter dataCenter, Pod pod, Clust
738738 AlertVO alert = null ;
739739 Long clusterId = cluster == null ? null : cluster .getId ();
740740 Long podId = pod == null ? null : pod .getId ();
741+ long dcId = dataCenter == null ? 0L : dataCenter .getId ();
741742 if ((alertType != AlertManager .AlertType .ALERT_TYPE_HOST ) && (alertType != AlertManager .AlertType .ALERT_TYPE_USERVM )
742743 && (alertType != AlertManager .AlertType .ALERT_TYPE_DOMAIN_ROUTER ) && (alertType != AlertManager .AlertType .ALERT_TYPE_CONSOLE_PROXY )
743744 && (alertType != AlertManager .AlertType .ALERT_TYPE_SSVM ) && (alertType != AlertManager .AlertType .ALERT_TYPE_STORAGE_MISC )
744745 && (alertType != AlertManager .AlertType .ALERT_TYPE_MANAGEMENT_NODE ) && (alertType != AlertManager .AlertType .ALERT_TYPE_RESOURCE_LIMIT_EXCEEDED )
745746 && (alertType != AlertManager .AlertType .ALERT_TYPE_UPLOAD_FAILED ) && (alertType != AlertManager .AlertType .ALERT_TYPE_OOBM_AUTH_ERROR )
746747 && (alertType != AlertManager .AlertType .ALERT_TYPE_HA_ACTION ) && (alertType != AlertManager .AlertType .ALERT_TYPE_CA_CERT )) {
747- alert = _alertDao .getLastAlert (alertType .getType (), dataCenter . getId () , podId , clusterId );
748+ alert = _alertDao .getLastAlert (alertType .getType (), dcId , podId , clusterId );
748749 }
749750
750751 if (alert == null ) {
@@ -754,7 +755,7 @@ public void sendAlert(AlertType alertType, DataCenter dataCenter, Pod pod, Clust
754755 newAlert .setContent (content );
755756 newAlert .setClusterId (clusterId );
756757 newAlert .setPodId (podId );
757- newAlert .setDataCenterId (dataCenter . getId () );
758+ newAlert .setDataCenterId (dcId );
758759 newAlert .setSentCount (1 );
759760 newAlert .setLastSent (new Date ());
760761 newAlert .setName (alertType .getName ());
0 commit comments