Records created with literal "null" strings in some fields instead of database NULL

I was creating a record in ForestAdmin. There are two Postgres JSONB fields without default values in DB. I didn’t fill these two fields in ForestAdmin form either.

Expected behavior

Record created with these two fields as database NULL.

Actual behavior

Record created with these two fields as a string literal “null” (4 letters).


Please provide any relevant information about your setup.

  • Package Version: “forest-express-sequelize”: “6.1.2”,
  • Express Version: “express”: “4.17.1”,
  • Sequelize Version: “sequelize”: “5.21.7”,
  • Database Dialect: Postgres
  • Database Version: PG 10.7
  • Project Name: fm-admin

Hello @weiwei9 :wave:, and welcome!

I’m able to reproduce this issue on my side. I am creating a bug entry to fix this behavior.


Hello @weiwei9 :wave:

I’m just writing to let you know that a fix has just been released, and null values should now be correctly set if neither value nor defaultValue have been specified.

:warning: You might want to force model resynchronization to see it working. I suggest to add a defaultValue to your model, then restart your server, then remove the defaultValue and restart again. The model will be resynchronized.

Thanks again for your feedback, do not hesitate to open a new topic if you have any further remarks or problem.