Skip to content

Commit

Permalink
(fix) Avoid adding duplicate session obs to obs payload
Browse files Browse the repository at this point in the history
  • Loading branch information
Jose Francisco committed Jan 14, 2025
1 parent 5375d04 commit c8b2271
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/group-form-entry-workflow/GroupSessionWorkspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const GroupSessionWorkspace = () => {
const visitUuid = activeVisitUuid ? activeVisitUuid : uuid();
if (!activeVisitUuid) {
Object.entries(groupSessionConcepts).forEach(([field, uuid]) => {
if (activeSessionMeta?.[field] != null) {
if (activeSessionMeta?.[field] != null && !payload.obs.some((obsItem) => obsItem.concept === uuid)) {
payload.obs.push({
concept: uuid,
value: activeSessionMeta[field],
Expand Down

0 comments on commit c8b2271

Please sign in to comment.