Ghost/core/server
Katharina Irrgang 9349e99e54 🐛 fix delete by author as transaction (#7145)
closes #7137

Deleting the content from the database runs in a transaction. see
https://github.com/TryGhost/Ghost/blob/master/core/server/api/users.js#L390

`destroyByAuthor` is one of the operations we trigger to delete all the conent, see https://github.com/TryGhost/Ghost/blob/master/core/server/models/post.js#L647

The post model has a specific hook for deleting content to delete the relations as well, see https://github.com/TryGhost/Ghost/blob/master/core/server/models/post.js#L122

This hook is part of the transaction. But the `options` are ignored. `(model/*, attr, options*/)` 
We use the `options` to forward the transaction reference, which we need to pass into the bookshelf queries. So `return model.load('tags').call('related', 'tags').call('detach')` does not forward the transaction and that's why it stucks when deleting the content.
2016-09-19 14:45:36 +01:00
..
api 🎨 Return gscan warnings from theme API (#7367) 2016-09-14 18:49:41 +01:00
apps ensure amp works when blog is running in subdirectory (#7353) 2016-09-14 12:47:25 +01:00
config 🎨 use apiUrl helper for scheduling initialisation (#7400) 2016-09-19 14:41:50 +01:00
controllers Fix upgrade notification type value (#7308) 2016-09-01 17:58:46 +02:00
data 🐛 😱 Fixing extract-zip derp-moment 2016-09-14 22:47:41 +01:00
errors 🎨 Improve theme validation error messaging (#7253) 2016-08-24 14:45:54 +02:00
events post-scheduling 2016-06-14 10:52:13 +02:00
helpers [FEATURE] AMP (#7229) 2016-08-22 18:49:27 +02:00
mail 🐛 Don't overwrite config.theme.title in GhostMail (#7224) 2016-08-19 10:22:07 +02:00
middleware 🎨 use apiUrl helper for scheduling initialisation (#7400) 2016-09-19 14:41:50 +01:00
models 🐛 fix delete by author as transaction (#7145) 2016-09-19 14:45:36 +01:00
permissions feature: theme upload/download/delete (#7209) 2016-08-23 13:07:25 +01:00
routes feature: theme upload/download/delete (#7209) 2016-08-23 13:07:25 +01:00
scheduling post-scheduling: delete job but time is null (#7035) 2016-06-28 20:14:29 +02:00
storage 🐛 better theme name consistency (#7380) 2016-09-14 17:24:28 +00:00
translations 🎨 Improve theme validation error messaging (#7253) 2016-08-24 14:45:54 +02:00
utils Use node-archiver to create zips (#7268) 2016-08-25 09:22:22 +02:00
views Switch to new native system font stack (#7219) 2016-08-18 20:29:46 +01:00
filters.js Misc grunt /dev updates 2015-05-28 20:25:14 +01:00
ghost-server.js Changed formatting of run time to human readable (#7318) 2016-09-19 11:28:18 +01:00
i18n.js improvement: general fixes 2016-06-01 07:07:20 +02:00
index.js 🎨 use apiUrl helper for scheduling initialisation (#7400) 2016-09-19 14:41:50 +01:00
overrides.js 🐛 move overrides into core folder (#7371) 2016-09-14 15:50:17 +01:00
update-check.js Fix upgrade notification type value (#7308) 2016-09-01 17:58:46 +02:00