From 17256ce599174b9a65f0e541fb715b750a8813ca Mon Sep 17 00:00:00 2001 From: George Goodall Date: Wed, 15 Jan 2025 12:45:03 +0000 Subject: [PATCH] fixing some entity issues that have entry numbers (due to duplicate reference issue) --- src/middleware/entryIssueDetails.middleware.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)