Skip to content

Hotfix for error seen in log #361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ async function fetchFromES (query, resource) {
const docs = await osClient.search({
index: config.get('osConfig.OS_INDEX'),
body: filter
})
})

// Extract data from hits
const rows = _.map(docs.body.hits.hits, single => single._source)
Expand Down
6 changes: 5 additions & 1 deletion src/common/informixHelper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Contains Informix helper methods for loading reviews from Informix
* Contains Informix helper methods for loading reviews from Informix
*/
const config = require('config')
const logger = require('./logger')
Expand Down Expand Up @@ -41,6 +41,10 @@ async function loadOnlineReviewDetails (authUser, submission) {

const reviews = queryInformix(query)

if (!reviews) {
return
}

for await (const dbReview of reviews) {
if (!submission.review) {
submission.review = []
Expand Down
2 changes: 1 addition & 1 deletion src/services/SubmissionService.js
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ async function countSubmissions (challengeId) {
result = await osClient.search({
index: config.get('osConfig.OS_INDEX'),
body: esQuery
})
})
} catch (err) {
logger.error(`Get Submission Count Error ${JSON.stringify(err)}`)
throw err
Expand Down