forest-express-mongoose icon indicating copy to clipboard operation
forest-express-mongoose copied to clipboard

Liana fails when fields are not selected by default

Open roopakv opened this issue 7 years ago • 0 comments

Expected behavior

We deselect certain fields by default in some of our models. An example would be the password field in the user object.

When we see the object, we should be allowed to modify only the fields that we change.

Actual behavior

The Liana refuses to save since the field is a required field. Further even if I add a value it fails some of our validation checks.

Failure Logs

[forest] 🌳🌳🌳  Cannot update the User #5ab186465f76210fd6f278d3 because of an unexpected issue: ValidationError: password: Cannot read property 'isProfileCompleted' of null

Context

TODO: Please provide any relevant information about your setup.

  • Package Version: ^2.14.2
  • Express Version: ^4.15.4
  • Mongoose Version: ^5.2.13
  • MongoDB Version: 3.6

roopakv avatar Oct 03 '18 06:10 roopakv