Skip to content

Commit 6650cab

Browse files
authored
Merge pull request #45 from haniffalab/fix/dataset_id
fix dataset_id on create
2 parents 2b1f541 + 3d552d2 commit 6650cab

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/api/dataset/content-types/dataset/lifecycles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
});
1111

1212
event.params.data.uid = uid;
13-
event.params.data.dataset_id = data.study?.connect?.[0] || null + ':' + uid;
13+
event.params.data.dataset_id = (data.study?.connect?.[0]?.id || null) + ':' + uid;
1414
},
1515
async beforeUpdate(event) {
1616
const { data, where } = event.params;

0 commit comments

Comments
 (0)