crugroup / spadeui

The Spade UI
37 stars 0 forks source link

UI goes blank when trying to upload a file #47

Closed zak-nuccio closed 6 months ago

zak-nuccio commented 6 months ago

Attempting to open a file in the File Upload Form will cause the screen to go blank and become unusable until the user refreshes the page. In the console this raises an "Invalid schema: null" error, though it's unclear what exactly is causing this.

ms32035 commented 6 months ago

image

This is related. System params and user params are set incorrectly on file creation

ms32035 commented 6 months ago

@jwasala same things seems to happen with process definition

jwasala commented 6 months ago

Yes this is related. When the user does not define user params/system params in file creation process, those fields are sent to backend as NULLs and saved in the db as NULLs. Then, when frontend attempts to parse form, there's an error.

I will make a two-step change to prevent that in the future: 1) Frontend will never send NULL for those fields - it will send an empty JSON {} (which works fine for empty form) 2) Frontend will check if the form is NULL anyway before trying to render it