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:
parent
b409a665b5
commit
0a20243540
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue