mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-02 08:13:34 +03:00
9349e99e54
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. |
||
---|---|---|
.. | ||
advanced_browse_spec.js | ||
api_authentication_spec.js | ||
api_configuration_spec.js | ||
api_db_spec.js | ||
api_mail_spec.js | ||
api_notifications_spec.js | ||
api_posts_spec.js | ||
api_roles_spec.js | ||
api_schedules_spec.js | ||
api_settings_spec.js | ||
api_slugs_spec.js | ||
api_subscription_spec.js | ||
api_tags_spec.js | ||
api_users_spec.js |