mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Update move-deleted-classroom-members script
This commit is contained in:
parent
fc9974dbe1
commit
50e8000faf
1 changed files with 4 additions and 0 deletions
|
@ -1,7 +1,11 @@
|
|||
load('bower_components/lodash/dist/lodash.js');
|
||||
var classrooms = db.classrooms.find();
|
||||
classrooms.forEach(function (classroom) {
|
||||
print('classroom', classroom._id);
|
||||
classroom.members.forEach(function (userID) {
|
||||
if (_.isString(userID)) {
|
||||
userID = ObjectId(userID);
|
||||
}
|
||||
var user = db.users.findOne({ _id: userID }, { deleted: true });
|
||||
if (user.deleted) {
|
||||
print('\tFOUND ONE', userID);
|
||||
|
|
Loading…
Reference in a new issue