Skip to content

Commit

Permalink
[bug fix] show RS bulk uploader errors (#6169)
Browse files Browse the repository at this point in the history
  • Loading branch information
zdeveloper authored Jul 20, 2023
1 parent 717a296 commit 0bb14ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,7 @@ public ResultUploadError(
Organization organization,
FeedbackMessage feedbackMessage,
UUID submissionId) {
this.uploadId = upload.getInternalId();
this.orgId = organization.getInternalId();
this.submissionId = submissionId;
this.type = feedbackMessage.getErrorType();
this.source = feedbackMessage.getSource();
this.field = feedbackMessage.getFieldHeader();
this.required = feedbackMessage.isFieldRequired();
this.message = feedbackMessage.getMessage();
this(organization, feedbackMessage, submissionId);
this.uploadId = (upload != null) ? upload.getInternalId() : null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,7 @@ private TestResultUpload saveSubmissionToDb(
response.getWarnings(),
response.getErrors());

result = _repo.save(result);

TestResultUpload finalResult = result;
TestResultUpload finalResult = (result.getReportId() != null) ? _repo.save(result) : null;

if (response.getErrors() != null && response.getErrors().length > 0) {
for (var error : response.getErrors()) {
Expand All @@ -408,7 +406,6 @@ private TestResultUpload saveSubmissionToDb(
.toList());
}
}

return result;
}

Expand Down

0 comments on commit 0bb14ee

Please sign in to comment.