Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind context where it was lost #275

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix losing context when POST on related model
  • Loading branch information
desaroger committed Aug 12, 2016
commit ba44e182c9822a4f0573c1fd5af15c6fbe6f0ab7
1 change: 1 addition & 0 deletions lib/mongodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ MongoDB.prototype.execute = function(model, command) {
var args = [].slice.call(arguments, 2);
// The last argument must be a callback function
var callback = args[args.length - 1];
callback = patchWithContext(callback);
var context = {
model: model,
collection: collection, req: {
Expand Down