Additional edit alert updates (#652)

This commit is contained in:
Karl Burtram
2018-07-09 10:48:26 -07:00
committed by GitHub
parent 5d267303ae
commit 4ac0ae87ee
3 changed files with 76 additions and 48 deletions

View File

@@ -182,12 +182,12 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
if (alertInfo.AlertType == Contracts.AlertType.SqlServerEvent)
{
if (this.alertInfo.MessageId.HasValue)
if (this.alertInfo.MessageId.HasValue && this.alertInfo.MessageId > 0)
{
alert.Severity = 0;
alert.MessageID = this.alertInfo.MessageId.Value;
}
else if (this.alertInfo.Severity.HasValue)
else if (this.alertInfo.Severity.HasValue && this.alertInfo.Severity > 0)
{
alert.Severity = this.alertInfo.Severity.Value;
alert.MessageID = 0;