0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Fixed the previous commit issue

refs 7a55e1a60a
This commit is contained in:
Thibaut Patel 2022-04-13 16:43:11 +02:00
parent 00e5e87d4b
commit bfbece948e

View file

@ -80,7 +80,7 @@ class PostsService {
if (!frame.options.newsletter_id) {
const newsletters = await this.models.Newsletter.findPage({status: 'active', limit: 1, columns: ['id']}, {transacting: frame.options.transacting});
if (newsletters.data.length > 0) {
frame.options.newsletter_id = newsletters.models[0].id;
frame.options.newsletter_id = newsletters.data[0].id;
}
}