Commit 01a6bec8 authored by mntmn's avatar mntmn
Browse files

fix loading space that user is member of

parent bdb2e9fd
......@@ -285,14 +285,14 @@ module.exports = {
} else {
var findMembershipsForSpace = function(space, allMemberships, prevRole) {
Membership.findAll({ where: {
"space": space._id
"space_id": space._id
}}).then(function(parentMemberships) {
var currentMemberships = parentMemberships.concat(allMemberships);
if (space.parent_space_id) {
Space.findOne({ where: {
"_id": space.parent_space_id
}}, function(err, parentSpace) {
}}).then(function(parentSpace) {
findMembershipsForSpace(parentSpace, currentMemberships, prevRole);
});
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment