Roles.addUsersToRoles : Error: After filtering out keys not in the schema, your modifier is now empty


#1

W20160725-15:29:37.944(1)? (STDERR) Error: After filtering out keys not in the schema, your modifier is now empty
W20160725-15:29:37.944(1)? (STDERR) at [object Object].doValidate (packages/aldeed_collection2-core/lib/collection2.js:374:1)
W20160725-15:29:37.945(1)? (STDERR) at [object Object].Mongo.Collection.(anonymous function) (packages/aldeed_collection2-core/lib/collection2.js:173:1)
W20160725-15:29:37.945(1)? (STDERR) at [object Object].Mongo.Collection.(anonymous function) [as update] (packages/babrahams_transactions/lib/transactions-common.js:1631:1)
W20160725-15:29:37.945(1)? (STDERR) at Object._.extend.updateUserRoles (packages/alanning_roles/roles_common.js:679:1)
W20160725-15:29:37.945(1)? (STDERR) at Object.
.extend.addUsersToRoles (packages/alanning_roles/roles_common.js:145:1)


#2

Are you attaching a schema to your Meteor.users collection? If so you’ll want to accommodate a roles property. Take a look at the Attach a Schema to Meteor.users section of the aldeed:collection2 docs for an example handling roles.