diff --git a/src/middleware/entryIssueDetails.middleware.js b/src/middleware/entryIssueDetails.middleware.js index 331718d9..cf632cf9 100644 --- a/src/middleware/entryIssueDetails.middleware.js +++ b/src/middleware/entryIssueDetails.middleware.js @@ -69,7 +69,7 @@ export const prepareEntry = (req, res, next) => { const issue = entryIssues[0] - if (!issue.entry_number || !issue.issue_type || typeof issue.line_number !== 'number') { + if (!(issue.entry_number || issue.entity) || !issue.issue_type || typeof issue.line_number !== 'number') { const error = new Error('Invalid entry issue structure') error.status = 500 return next(error)