change index definition
This commit is contained in:
parent
24d611b653
commit
bb5971bd82
|
@ -66,7 +66,7 @@ exports.validate = async ({ appId, tableId, row, table }) => {
|
||||||
}
|
}
|
||||||
let res
|
let res
|
||||||
|
|
||||||
// Validate.js doesn't seem to handle array of array very well
|
// Validate.js doesn't seem to handle array
|
||||||
if (table.schema[fieldName].type === FieldTypes.ARRAY) {
|
if (table.schema[fieldName].type === FieldTypes.ARRAY) {
|
||||||
row[fieldName].map(val => {
|
row[fieldName].map(val => {
|
||||||
if (!constraints.inclusion.includes(val)) {
|
if (!constraints.inclusion.includes(val)) {
|
||||||
|
|
|
@ -102,7 +102,7 @@ exports.createAllSearchIndex = async appId => {
|
||||||
if (Array.isArray(input[key])) {
|
if (Array.isArray(input[key])) {
|
||||||
for (let val in input[key]) {
|
for (let val in input[key]) {
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
index(`${idxKey}`, input[key][val], {
|
index(idxKey, input[key][val], {
|
||||||
store: true,
|
store: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue