goat-community / goat

This is the home of Geo Open Accessibility Tool (GOAT)
GNU General Public License v3.0
89 stars 47 forks source link

Dashboard is sending empty strings instead of NULL #2233

Closed EPajares closed 12 months ago

EPajares commented 1 year ago

The dashboard is sending "" instead of nothing in case the field is not filled. As a result the database is population empty strings instead of leaving the field with NULL. This is causing problems in few cases for some downstream config functions.

This happens for at least the layer section: image

@cinaaaa could you check if this also happens for some other pages and try to fix it.

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce

1. 2. 3. 4.

Context (Environment)

Detailed Description

Possible Implementation

cinaaaa commented 1 year ago

Hey @EPajares , I've just deployed the modified version of the dashboard to the dashboard-dev.plan4better.de you can check it and lemme know if things work well then I will migrate it to production. Don't forget the hard-refresh ;)

EPajares commented 1 year ago

I checked it. It send "null" now. Can we just remove the property?

cinaaaa commented 1 year ago

I checked it. It send "null" now. Can we just remove the property?

I'm dropping the null properties already, can you please send the page link that you've tested this?

EPajares commented 1 year ago

I tested here:

https://dashboard-dev.plan4better.de/layers/valid_data

EPajares commented 1 year ago

Image

cinaaaa commented 1 year ago

Image

Hey Elias, the response tab content is the server-returned data, You can see that I'm dropping the empty values in the payload tab.

p4b-bro[bot] commented 12 months ago

This task/issue closed on Tue May 23 2023 ✅