bettersg / SchemesSG_v3

Refactor of SchemeseSG 2024
3 stars 1 forks source link

validate schemespal input #25

Closed rebeccacxy closed 3 months ago

rebeccacxy commented 3 months ago

fixes #24

validates schemespal input through frontend. this change only checks for empty string but maybe ascii pattern is better.

previously, backend will accept empty string and throw the following error:

  File "/Users/home/Desktop/SchemesSG_v3/.venv/lib/python3.12/site-packages/numpy/lib/function_base.py", line 4835, in _quantile
    previous = arr[previous_indexes]
               ~~~^^^^^^^^^^^^^^^^^^
IndexError: index -1 is out of bounds for axis 0 with size 0
Screenshot 2024-08-22 at 6 42 34 PM Screenshot 2024-08-22 at 6 48 24 PM