As I did like a hundred times, I set a PUT route in order to update a record. But this time, I get the following error :
The Document record you are trying to update is invalid.
Nothing happens in my network tab, like FA front-end is preventing me to trigger my route. I have no clue why. My model is pretty straightforward :
const CoownershipDocuments = sequelize.define('coownershipDocuments', {
displayName: {
type: DataTypes.STRING,
},
documentName: {
type: DataTypes.STRING,
},
sergicId: {
type: DataTypes.INTEGER,
},
sergicUpdateTime: {
type: DataTypes.DATE,
},
createdAt: {
type: DataTypes.DATE,
},
updatedAt: {
type: DataTypes.DATE,
},
onlyVisibleByCsMember: {
type: DataTypes.BOOLEAN,
defaultValue: false,
},
fileUrl: {
type: DataTypes.STRING,
},
sergicCreatedAt: {
type: DataTypes.DATE,
},
kind: {
type: DataTypes.ENUM([
'rcp',
'statement',
'mri_guarantee',
'convocation',
'cs_meeting',
'default'
]),
},
}, {
tableName: 'coownership_documents',
underscored: true,
schema: process.env.DATABASE_SCHEMA,
});
I try to edit the displayName, onlyVisibleByCsMember and kind fields in the record summary view.
Expected behavior
FA front-end should send a PUT call on
router.put('/coownershipDocuments/:recordId',
Actual behavior
The Document record you are trying to update is invalid.