fixed welcome email containing deleted articles

This commit is contained in:
Mia Rose Winter 2024-06-04 14:22:13 +02:00
parent 42014a831c
commit da590b721c
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E

View file

@ -80,7 +80,7 @@
await Email.ClearToken(Id, Token);
var articles = await context.Set<EmailNewsletter>()
.IgnoreAutoIncludes().IgnoreQueryFilters().Where(n => n.IsSend)
.IgnoreAutoIncludes().IgnoreQueryFilters().Where(n => n.IsSend && !n.Article.IsDeleted)
.Include(a => a.Article).ThenInclude(a => a.Author)
.OrderByDescending(a => a.DistributionDateTime)
.Take(3)