Open ntraut opened 3 years ago
If we run brainbox in localhost with mongodb 4.4, when we can't access to a project page. Looking at the code it is because of this instruction:
req.db.get('project').findOne({shortname:req.params.projectName, backup:{$exists:0}}, "-_id")
which returns instead of the project json:
_id:null __proto__:Object
It is because the argument "-_id" which is used by monk doesn't work with mongodb 4.4. The new way to do would be to use instead the argument { _id: 0 } but it is not recognized by monk.
"-_id"
{ _id: 0 }
Can access to project page.
node --version && npm --version
v12.17.0 7.10.0
Thank you for your feedback.
Please tag your issue as a feature request or a bug report using the labels on the right.
Current behaviour
If we run brainbox in localhost with mongodb 4.4, when we can't access to a project page. Looking at the code it is because of this instruction:
which returns instead of the project json:
It is because the argument
"-_id"
which is used by monk doesn't work with mongodb 4.4. The new way to do would be to use instead the argument{ _id: 0 }
but it is not recognized by monk.Expected behaviour
Can access to project page.
Version information (for bug reports)
v12.17.0 7.10.0