Getting error while modifying Segment where cause.
Observed behavior
Getting error while adding where clause in segment
Expected behavior
The segment should be created with updated where cause.
Field type
{
"field": "roles",
"type": ["Enum"],
"defaultValue": null,
"enums": ["AUTHOR", "READER"],
"integration": null,
"isFilterable": true,
"isPrimaryKey": false,
"isReadOnly": false,
"isRequired": false,
"isSortable": true,
"isVirtual": false,
"reference": null,
"inverseOf": null,
"validations": []
}
roles: {
type: DataTypes.ARRAY(DataTypes.ENUM(
'AUTHOR',
'READER',
)),
}
Error Log
"Invalid patch value (path: "/collections/user/layout/segments/4223c9f0-543e-11ec-8a97-3f44d1665879/filter", op: "replace",
value: {"type":"and",
"conditions":[{"operator":"includes all","value":["AUTHOR"],
"embeddedField":null,
"fieldName":"roles",
"subFieldName":null,
"id":"80694510-750d-11ec-8e5c-15330a4a3a67"}],
"id":"4222b880-543e-11ec-8a97-3f44d1665879"}): ValidationError: child "conditions" fails because ["conditions" at position 0 fails because [child "value" fails because ["value" must be a string, "value" must be a number, "value" must be a boolean]]]"
Context
- Project name: Laterpress
- Environment name: Development
- Database Dialect: postgresql
- Agent type & version: base
- Recent changes made on your end if any: We are modifying where clause column