Skip to content

Commit

Permalink
ISSUE #4641 fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
carmenfan committed Jan 17, 2024
1 parent b9744fa commit 79d817c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions backend/src/v4/models/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
const { v5Path } = require("../../interop");

const { getCommonElements } = require(`${v5Path}/utils/helper/arrays`);
const { deleteIfUndefined } = require(`${v5Path}/utils/helper/objects`);
const { idTypes, idTypesToKeys } = require(`${v5Path}/models/metadata.constants`);
const { getMetadataWithMatchingData } = require(`${v5Path}/models/metadata`);
const { sharedIdsToExternalIds, getMeshesWithParentIds } = require(`${v5Path}/processors/teamspaces/projects/models/commons/scenes`);
Expand Down Expand Up @@ -200,10 +201,7 @@ function getObjectsArrayAsExternalIds(account, model, branch, rId, data) {

// have to have shared_ids, IFC or RVT ids, but not more than one
if (
(!containerEntry[idTypes.IFC] && !containerEntry[idTypes.RVT] && !containerEntry.shared_ids) ||
!(containerEntry[idTypes.IFC] && !containerEntry[idTypes.RVT] && !containerEntry.shared_ids) ||
!(!containerEntry[idTypes.IFC] && containerEntry[idTypes.RVT] && !containerEntry.shared_ids) ||
!(!containerEntry[idTypes.IFC] && !containerEntry[idTypes.RVT] && containerEntry.shared_ids)
getCommonElements([...Object.values(idTypes), "shared_ids"], Object.keys(deleteIfUndefined(containerEntry))).length !== 1
) {
return Promise.reject(responseCodes.INVALID_GROUP);
}
Expand Down

0 comments on commit 79d817c

Please sign in to comment.