Added validation for the case the header is not a string
This commit is contained in:
parent
43a6b6e0a6
commit
ac2e8b799d
2 changed files with 3 additions and 2 deletions
|
|
@ -64,6 +64,7 @@ function uploadFile(endpoint) {
|
|||
const cellValue = worksheet[headerCoordinates[header]]?.v;
|
||||
if (
|
||||
!cellValue ||
|
||||
$.type(cellValue) !== "string" ||
|
||||
cellValue.trim().toLowerCase() !== header.toLowerCase()
|
||||
) {
|
||||
$("#upload-error")
|
||||
|
|
|
|||
|
|
@ -171,8 +171,8 @@ def test_ventilation_window_hepa(baseline_form: model_generator.FormData):
|
|||
@pytest.mark.parametrize(
|
||||
["activity", "total_people", "infected_people", "error"],
|
||||
[
|
||||
['office', 10, 11, "Number of infected people cannot be more or equal than number of total people."],
|
||||
['office', 10, 10, "Number of infected people cannot be more or equal than number of total people."],
|
||||
['office', 10, 11, "Number of infected people cannot be greater or equal to the number of total people"],
|
||||
['office', 10, 10, "Number of infected people cannot be greater or equal to the number of total people"],
|
||||
['training', 10, 2, "Conference/Training activities are limited to 1 infected."],
|
||||
]
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue