Fix bug.
This commit is contained in:
parent
497c32685a
commit
fe9c1dae14
|
@ -625,9 +625,9 @@ class Admin::SitePanelController < OrbitAdminController
|
||||||
member = db.member_profiles.update(member_query, {$set: member_data});
|
member = db.member_profiles.update(member_query, {$set: member_data});
|
||||||
}else{
|
}else{
|
||||||
var bulk = db.member_profiles.initializeUnorderedBulkOp();
|
var bulk = db.member_profiles.initializeUnorderedBulkOp();
|
||||||
bulk.find(member_query).upsert().updateOne(member_data);
|
bulk.insert(member_data);
|
||||||
var result = bulk.execute();
|
bulk.execute();
|
||||||
user_data.member_profile_id = result.getUpsertedIds()[0][\"_id\"];
|
user_data.member_profile_id = bulk.getOperations()[0][\"operations\"][0][\"_id\"];
|
||||||
db.users.update(user_query, {$set: user_data});
|
db.users.update(user_query, {$set: user_data});
|
||||||
}
|
}
|
||||||
}()' {{db_name}}""".gsub(/\n|^ */,"")
|
}()' {{db_name}}""".gsub(/\n|^ */,"")
|
||||||
|
|
Loading…
Reference in New Issue