Skip to content

Commit

Permalink
fix: event.details.data can be null dataset update worker
Browse files Browse the repository at this point in the history
  • Loading branch information
sadiqkhoja committed May 18, 2023
1 parent 7613cf4 commit 505a2d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/worker/dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
const { getOrNotFound } = require('../util/promise');

const createEntitiesFromPendingSubmissions = async ({ Entities, Datasets }, event) => {
if (!event.details.data.approvalRequired && event.details.autoConvert) {
if (event.details.data && !event.details.data.approvalRequired && event.details.autoConvert) {
const dataset = await Datasets.getByActeeId(event.acteeId).then(getOrNotFound);
const pendingSubmissions = await Datasets.getUnprocessedSubmissions(dataset.id);

Expand Down

0 comments on commit 505a2d8

Please sign in to comment.