Skip to content

Commit 0d1d6db

Browse files
committed
ISSUE #4641 further v4 fixes
1 parent 188c4b2 commit 0d1d6db

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

backend/src/v4/models/group.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ const Group = {};
230230
Group.create = async function (account, model, branch = "master", rid = null, sessionId, creator = "", data) {
231231
const newGroup = {};
232232

233-
const convertedObjects = await getObjectsArrayAsExternalIds(account, model, branch, rid, data, false);
233+
const convertedObjects = data.objects ? await getObjectsArrayAsExternalIds(account, model, branch, rid, data, false) : undefined;
234234

235235
let typeCorrect = (!data.objects !== !data.rules);
236236

@@ -302,7 +302,7 @@ Group.findByUID = async function (account, model, branch, revId, uid, showIfcGui
302302
}
303303

304304
if (convertToIfcGuids) {
305-
foundGroup.objects = await getObjectsArrayAsExternalIds(account, mode, branch, revId, foundGroup);
305+
foundGroup.objects = await getObjectsArrayAsExternalIds(account, model, branch, revId, foundGroup);
306306
} else {
307307
try {
308308
foundGroup.objects = await getObjectIds(account, model, branch, revId, foundGroup, showIfcGuids);
@@ -373,7 +373,7 @@ Group.getList = async function (account, model, branch, revId, ids, queryParams,
373373
Group.update = async function (account, model, branch = "master", revId = null, sessionId, user = "", groupId, data) {
374374
const group = await Group.findByUID(account, model, branch, revId, groupId);
375375

376-
const convertedObjects = await getObjectsArrayAsExternalIds(account, model, branch, revId, data, false);
376+
const convertedObjects = data.objects ? await getObjectsArrayAsExternalIds(account, model, branch, revId, data, false) : undefined;
377377
const toUpdate = {};
378378
const toUnset = {};
379379

0 commit comments

Comments
 (0)