Fixed a bug in the Link model
This commit is contained in:
@ -20,9 +20,9 @@ module.exports = db.define("links", {
|
|||||||
},
|
},
|
||||||
tags: {
|
tags: {
|
||||||
type: Sequelize.STRING,
|
type: Sequelize.STRING,
|
||||||
defaultValue: "",
|
allowNull: true,
|
||||||
get() {
|
get() {
|
||||||
return this.getDataValue('tags').split(',');
|
return this.getDataValue('tags')?.split(',');
|
||||||
},
|
},
|
||||||
set(val) {
|
set(val) {
|
||||||
this.setDataValue('tags', val.join(','));
|
this.setDataValue('tags', val.join(','));
|
||||||
|
Reference in New Issue
Block a user