mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-14 09:52:09 +03:00
parent
27ecb3b211
commit
4500b14989
@ -136,6 +136,10 @@ _.extend(BaseSiteMapGenerator.prototype, {
|
||||
|
||||
removeUrl: function (model) {
|
||||
var datum = model.toJSON();
|
||||
// When the model is destroyed we need to fetch previousAttributes
|
||||
if (!datum.id) {
|
||||
datum = model.previousAttributes();
|
||||
}
|
||||
this.removeFromLookups(datum);
|
||||
|
||||
this.lastModified = Date.now();
|
||||
|
@ -107,7 +107,6 @@ Post = ghostBookshelf.Model.extend({
|
||||
if (model.previous('status') === 'published') {
|
||||
model.emitChange('unpublished');
|
||||
}
|
||||
|
||||
model.emitChange('deleted');
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user