fixed potential duplicate key value bug with Newsletter
This commit is contained in:
parent
2ccfe15199
commit
3b643a1421
|
@ -189,7 +189,7 @@
|
|||
Article = Article,
|
||||
DistributionDateTime = Article.PublishDate
|
||||
};
|
||||
context.Add(newsletter);
|
||||
await context.Set<EmailNewsletter>().AddAsync(newsletter);
|
||||
await context.SaveChangesAsync();
|
||||
} catch (Exception ex) {
|
||||
Logger.LogError(ex, "Failed to schedule article {name} for E-Mail distribution.", Article.Title);
|
||||
|
|
Loading…
Reference in a new issue