Skip to content

Commit 27032df

Browse files
committed
Ensure objectId is set for MCC demographics table
1 parent 5f4d832 commit 27032df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mcc/resources/queries/study/demographics.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function onInit(event, helper){
2020
}
2121

2222
function onUpsert(helper, scriptErrors, row, oldRow){
23-
row.objectId = row.objectId || oldRow?.objectId || LABKEY.Utils.generateUUID().toUpperCase()
23+
row.objectId = row.objectId || (oldRow ? oldRow.objectId : null) || LABKEY.Utils.generateUUID().toUpperCase()
2424

2525
if (row.status && row.status.match(/Undetermined/)) {
2626
row.status = 'Unknown';

0 commit comments

Comments
 (0)