You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can save a doc with the property aGoodMan equal to true.
It will not be possible to change it to false then.
The reason is in the method async apiPut of class DefaultModelMethods.
asyncapiPut(data){//// this points to document (schema.methods.)this.schema.eachPath((pathname)=>{if(data[pathname]){this[pathname]=data[pathname];}elseif(data[pathname]===null){this[pathname]=undefined;}});awaitthis.save();}
It's better to change the method of checking value to something like this:
asyncapiPut(data){//// this points to document (schema.methods.)this.schema.eachPath((pathname)=>{if(data[pathname]!==undefined){this[pathname]=data[pathname];}elseif(data[pathname]===null){this[pathname]=undefined;}});awaitthis.save();}
The text was updated successfully, but these errors were encountered:
The schema will not work properly
You can save a doc with the property
aGoodMan
equal totrue
.It will not be possible to change it to
false
then.The reason is in the method
async apiPut
of classDefaultModelMethods
.It's better to change the method of checking value to something like this:
The text was updated successfully, but these errors were encountered: