mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 05:50:35 +03:00
v4.8.1
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQTqYa7kNs8D7Oo9dgLSEYbwtHKVrQUCYNRcHQAKCRDSEYbwtHKV rQJeAP9ufmgIztn1oj8kF7tZMZk4xaVCakqIgyQBlPvFKc+aawD8Dv44mmZ4Ntar 7FQ52i07TCwk/b8lCUwxD4maYBuZNAE= =fgVN -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQTqYa7kNs8D7Oo9dgLSEYbwtHKVrQUCYNRciwAKCRDSEYbwtHKV rRatAQCJ27vyVeGYlnXVWF0XSgj3+QEwl2eEgh4GoVp4BPzHAwD/WrGvKRvddDtA kiqv93vRTda3GV1R4FGYVl34MwbGFAA= =+Yci -----END PGP SIGNATURE----- Merged v4.8.1 into main v4.8.1
This commit is contained in:
commit
ac8029680c
@ -1 +1 @@
|
||||
Subproject commit a2517f3190e9ee77ef0e7fef5372fae43356c002
|
||||
Subproject commit 4c4fcdad486670e9202f8ca22f77c4333c3bb3ec
|
@ -97,6 +97,8 @@ module.exports = {
|
||||
},
|
||||
permissions: true,
|
||||
query(frame) {
|
||||
frame.options.require = true;
|
||||
|
||||
return models.Snippet.destroy(frame.options)
|
||||
.then(() => null)
|
||||
.catch(models.Snippet.NotFoundError, () => {
|
||||
|
@ -97,6 +97,8 @@ module.exports = {
|
||||
},
|
||||
permissions: true,
|
||||
query(frame) {
|
||||
frame.options.require = true;
|
||||
|
||||
return models.Snippet.destroy(frame.options)
|
||||
.then(() => null)
|
||||
.catch(models.Snippet.NotFoundError, () => {
|
||||
|
@ -198,7 +198,7 @@ module.exports = function (Bookshelf) {
|
||||
* @param {Object} [unfilteredOptions]
|
||||
* @return {Promise<Bookshelf['Model']>} Empty Model
|
||||
*/
|
||||
destroy: async function destroy(unfilteredOptions) {
|
||||
destroy: function destroy(unfilteredOptions) {
|
||||
const options = this.filterOptions(unfilteredOptions, 'destroy');
|
||||
|
||||
if (!options.destroyBy) {
|
||||
@ -208,8 +208,11 @@ module.exports = function (Bookshelf) {
|
||||
}
|
||||
|
||||
// Fetch the object before destroying it, so that the changed data is available to events
|
||||
const obj = await this.forge(options.destroyBy).fetch(options);
|
||||
return this.forge(options.destroyBy)
|
||||
.fetch(options)
|
||||
.then(function then(obj) {
|
||||
return obj.destroy(options);
|
||||
});
|
||||
},
|
||||
|
||||
// When loading an instance, subclasses can specify default to fetch
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ghost",
|
||||
"version": "4.8.0",
|
||||
"version": "4.8.1",
|
||||
"description": "The professional publishing platform",
|
||||
"author": "Ghost Foundation",
|
||||
"homepage": "https://ghost.org",
|
||||
|
Loading…
Reference in New Issue
Block a user