fix: Long search term causes server error writing query to db (#2237)

closes #2234
This commit is contained in:
Tom Moor
2021-06-17 23:23:35 -07:00
committed by GitHub
parent 5f3a38bf87
commit 1a2a0f4264
2 changed files with 18 additions and 0 deletions

View File

@ -15,6 +15,9 @@ const SearchQuery = sequelize.define(
},
query: {
type: DataTypes.STRING,
set(val) {
this.setDataValue("query", val.substring(0, 255));
},
allowNull: false,
},
results: {