Skip to content

Commit

Permalink
Add branchid to entity base version query
Browse files Browse the repository at this point in the history
  • Loading branch information
ktuite committed Aug 21, 2024
1 parent e748024 commit b2defdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/model/query/entities.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ const _computeBaseVersion = (eventId, dataset, clientEntity, submissionDef) => a
else if (clientEntity.def.baseVersion === clientEntity.def.trunkVersion) // Start of an offline branch
condition = { version: clientEntity.def.baseVersion };
else // middle of an offline branch
condition = { branchBaseVersion: clientEntity.def.baseVersion - 1 };
condition = { branchId: clientEntity.def.branchId, branchBaseVersion: clientEntity.def.baseVersion - 1 };

const baseEntityVersion = await Entities.getDef(dataset.id, clientEntity.uuid, new QueryOptions({ condition }));

Expand Down

0 comments on commit b2defdc

Please sign in to comment.