Skip to content

Commit

Permalink
Fix departed_added_by update
Browse files Browse the repository at this point in the history
  • Loading branch information
patari committed Jan 21, 2025
1 parent d3abd8b commit 9d345eb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ SET group_id = ${bind(groupId)},
arrived_modified_at = CASE WHEN arrived != ${bind(arrivalTime)} THEN ${bind(modifiedAt)} ELSE arrived_modified_at END,
arrived_modified_by = CASE WHEN arrived != ${bind(arrivalTime)} THEN ${bind(modifiedBy)} ELSE arrived_modified_by END,
departed_added_at = CASE WHEN arrived_added_at IS NOT NULL AND departed IS DISTINCT FROM ${bind(departureTime)} THEN coalesce(departed_added_at, ${bind(modifiedAt)}) ELSE departed_added_at END,
departed_added_by = CASE WHEN departed IS DISTINCT FROM ${bind(departureTime)} THEN coalesce(departed_added_by, ${bind(modifiedBy)}) ELSE departed_added_by END,
departed_added_by = CASE WHEN arrived_added_by IS NOT NULL AND departed IS DISTINCT FROM ${bind(departureTime)} THEN coalesce(departed_added_by, ${bind(modifiedBy)}) ELSE departed_added_by END,
departed_modified_at = CASE WHEN departed IS DISTINCT FROM ${bind(departureTime)} THEN ${bind(modifiedAt)} ELSE departed_modified_at END,
departed_modified_by = CASE WHEN departed IS DISTINCT FROM ${bind(departureTime)} THEN ${bind(modifiedBy)} ELSE departed_modified_by END
WHERE id = ${bind(attendanceId)}
Expand Down

0 comments on commit 9d345eb

Please sign in to comment.