Browse Source

Merge pull request #6109 from Budibase/bug/sev2/automation-trigger-save-multiselect

Automation validation - convert array string to array type
master
melohagan 4 years ago
committed by GitHub
parent
commit
5951794b4d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      packages/server/src/api/controllers/row/utils.js

3
packages/server/src/api/controllers/row/utils.js

@ -64,6 +64,9 @@ exports.validate = async ({ tableId, row, table }) => {
// Validate.js doesn't seem to handle array
if (type === FieldTypes.ARRAY && row[fieldName]) {
if (row[fieldName].length) {
if (!Array.isArray(row[fieldName])) {
row[fieldName] = row[fieldName].split(",")
}
row[fieldName].map(val => {
if (
!constraints.inclusion.includes(val) &&

Loading…
Cancel
Save