FastUI icon indicating copy to clipboard operation
FastUI copied to clipboard

fix scalar as list with multi selects

Open schatimo opened this issue 1 year ago • 3 comments

This PR fixes #122.

schatimo avatar Dec 31 '23 14:12 schatimo

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (cec25c6) 94.05% compared to head (ef4a424) 94.05%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #141   +/-   ##
=======================================
  Coverage   94.05%   94.05%           
=======================================
  Files          11       11           
  Lines         723      723           
=======================================
  Hits          680      680           
  Misses         43       43           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Dec 31 '23 14:12 codecov[bot]

Looks good, please can you add a test, also I think there's another field that needs the same.

samuelcolvin avatar Dec 31 '23 15:12 samuelcolvin

Sure, I added a test for the validation method to make sure that we get a 200 response when the argument is a str but the pydantic model expects a list[str].

Before filing the PR, I checked the model BigModel and in particular the field profile_pics which is of type Annotated[list[UploadFile], FormFile(accept='image/*')] | None. However, there I did not receive a 422 error when providing only one file.

schatimo avatar Dec 31 '23 16:12 schatimo