Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
marcolarosa committed Sep 28, 2023
1 parent 8e8cdb3 commit 89c6557
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/src/routes/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ async function createAndLinkEntityHandler(req) {

// find the source entity
const sourceEntityId = decodeURIComponent(req.params.entityId);
let sourceEntity = await this.models.entity.findOne({ where: { eid: sourceEntityId } });
let sourceEntity = await this.models.entity.findOne({
where: { collectionId, eid: sourceEntityId },
});

// create the new entity
let entity = { ...req.body.entity };
Expand Down

0 comments on commit 89c6557

Please sign in to comment.