Skip to content

Commit

Permalink
fix: populate details fields
Browse files Browse the repository at this point in the history
  • Loading branch information
7sete7 committed Dec 6, 2023
1 parent 3b6eceb commit 990f110
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/imports/data/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -677,13 +677,13 @@ export async function populateDetailFieldsInRecord({ record, document, authToken

const record = await findById({
authTokenId,
document,
document: field.document,
fields: field.detailFields.join(','),
dataId: value._id,
});

if (has(record, 'data.0')) {
return record.data[0];
return { ...value, ...record.data[0] };
}
};

Expand Down

0 comments on commit 990f110

Please sign in to comment.