Skip to content

Commit

Permalink
fix: non renseigne
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudambro committed Jul 29, 2024
1 parent 98fe855 commit 179f44c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api-node/src/utils/bathing_water/scrapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ export async function scrapeHtmlBaignadesSitePage(
return BathingWaterResultEnum.GOOD;
default:
// if there is no test result, the parsing fails and the value is 'communiqué'
if (lastTest.includes('Non renseign')) {
return BathingWaterResultEnum.NO_RESULT_FOUND;
}
if (value !== 'communiqué' && !!value) {
capture(`Unknown bathing water label ${value}`, {
extra: {
Expand All @@ -131,7 +134,7 @@ export async function scrapeHtmlBaignadesSitePage(
});
}
// TODO FIXME: we should return BathingWaterResultEnum.NO_RESULT_FOUND
return BathingWaterResultEnum.GOOD;
return BathingWaterResultEnum.NO_RESULT_FOUND;
}
}

Expand Down

0 comments on commit 179f44c

Please sign in to comment.