Skip to content

Commit

Permalink
ISSUE #4641 further v4 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
carmenfan committed Jan 11, 2024
1 parent 188c4b2 commit 0d1d6db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/src/v4/models/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ const Group = {};
Group.create = async function (account, model, branch = "master", rid = null, sessionId, creator = "", data) {
const newGroup = {};

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

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

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

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

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

Expand Down

0 comments on commit 0d1d6db

Please sign in to comment.