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

Fixed knex connection pool errors when saving posts with sqlite

no issue

- sub query within the `Post.onSaving` method was not passing through the transaction options which was locking up sqlite
This commit is contained in:
Kevin Ansfield 2019-11-15 15:11:55 +00:00
parent b409a665b5
commit 0a20243540

View file

@ -465,7 +465,7 @@ Post = ghostBookshelf.Model.extend({
// ensure draft posts have the send_email_when_published reset unless an email has already been sent
if (newStatus === 'draft' && this.hasChanged('status')) {
ops.push(function ensureSendEmailWhenPublishedIsUnchanged() {
return self.related('email').fetch().then((email) => {
return self.related('email').fetch({transacting: options.transacting}).then((email) => {
if (email) {
self.set('send_email_when_published', true);
} else {