Skip to content

Commit 88cf4f5

Browse files
committed
ISSUE #4641 address feedback
1 parent 79d817c commit 88cf4f5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

backend/src/v4/models/group.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ function clean(groupData) {
112112
}
113113
});
114114

115+
cleanArray(groupData.objects[i], "shared_ids");
115116
if (groupData.objects[i].shared_ids) {
116-
cleanArray(groupData.objects[i], "shared_ids");
117-
groupData.objects[i].shared_ids = groupData.objects[i].shared_ids.map(x => utils.uuidToString(x));
117+
groupData.objects[i].shared_ids = groupData.objects[i].shared_ids.map(utils.uuidToString);
118118
}
119119
}
120120

@@ -242,7 +242,7 @@ const Group = {};
242242
Group.create = async function (account, model, branch = "master", rid = null, sessionId, creator = "", data) {
243243
const newGroup = {};
244244

245-
const convertedObjects = Array.isArray(data.objects) ? await getObjectsArrayAsExternalIds(account, model, branch, rid, data, false) : undefined;
245+
const convertedObjects = Array.isArray(data.objects) ? await getObjectsArrayAsExternalIds(account, model, branch, rid, data) : undefined;
246246

247247
let typeCorrect = (!data.objects !== !data.rules);
248248

@@ -317,7 +317,7 @@ Group.findByUID = async function (account, model, branch, revId, uid, showIfcGui
317317
foundGroup.objects = await getObjectsArrayAsExternalIds(account, model, branch, revId, foundGroup);
318318
} else {
319319
try {
320-
foundGroup.objects = await getObjectIds(account, model, branch, revId, foundGroup, showIfcGuids);
320+
foundGroup.objects = await getObjectIds(account, model, branch, revId, foundGroup, !noClean, showIfcGuids);
321321
} catch (err) {
322322
// This can happen if there's no revisions
323323
}

0 commit comments

Comments
 (0)