do not overwrite slug when title is modified to preserve links

This commit is contained in:
lesion
2021-10-30 13:09:51 +02:00
parent b65fa97c3b
commit 7fdd0f0537

View File

@@ -69,7 +69,7 @@ Resource.belongsTo(Event)
Event.hasMany(Event, { as: 'child', foreignKey: 'parentId' })
Event.belongsTo(Event, { as: 'parent' })
SequelizeSlugify.slugifyModel(Event, { source: ['title'] })
SequelizeSlugify.slugifyModel(Event, { source: ['title'], overwrite: false })
Event.prototype.toAPNote = function (username, locale, to = []) {
const tags = this.tags && this.tags.map(t => t.tag.replace(/[ #]/g, '_'))