Skip to content

Commit

Permalink
Merge pull request #2939 from sbwalker/dev
Browse files Browse the repository at this point in the history
filter deleted sites in notification job
  • Loading branch information
sbwalker authored Jun 27, 2023
2 parents cd8d2dd + 60b6a9c commit ea4b85a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Oqtane.Server/Infrastructure/Jobs/NotificationJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public override string ExecuteJob(IServiceProvider provider)
// get site settings
List<Setting> sitesettings = settingRepository.GetSettings(EntityNames.Site, site.SiteId).ToList();
Dictionary<string, string> settings = GetSettings(sitesettings);
if (!settings.ContainsKey("SMTPEnabled") || settings["SMTPEnabled"] == "True")
if (!site.IsDeleted && (!settings.ContainsKey("SMTPEnabled") || settings["SMTPEnabled"] == "True"))
{
if (settings.ContainsKey("SMTPHost") && settings["SMTPHost"] != "" &&
settings.ContainsKey("SMTPPort") && settings["SMTPPort"] != "" &&
Expand Down Expand Up @@ -162,7 +162,7 @@ public override string ExecuteJob(IServiceProvider provider)
}
else
{
log += "SMTP Disabled In Site Settings" + "<br />";
log += "Site Deleted Or SMTP Disabled In Site Settings" + "<br />";
}
}

Expand Down

0 comments on commit ea4b85a

Please sign in to comment.