Skip to content

Commit

Permalink
HotFix: Validation too strict on fetchDataGroup result (#4413)
Browse files Browse the repository at this point in the history
  • Loading branch information
biaoli0 authored Mar 31, 2023
1 parent 67d45f0 commit 8c345a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ export class ReportServerAggregator {
.of(
yup.object().shape({
code: yup.string().required(),
text: yup.string().required(),
text: yup.string(),
name: yup.string(),
}),
)
.required(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class RawDataExportBuilder {
const { dataElements } = await this.aggregator.fetchDataGroup(surveyCode);
return dataElements.map(dataElement => ({
key: dataElement.code,
title: dataElement.text,
title: dataElement.text || dataElement.name || '',
}));
}),
)
Expand Down

0 comments on commit 8c345a6

Please sign in to comment.