GEOLYTIX / xyz

An open source javascript framework for spatial data and application interfaces.
MIT License
86 stars 25 forks source link

Location Update: fix so it updates the field in the db #1285

Closed AlexanderGeere closed 1 month ago

AlexanderGeere commented 1 month ago

Noticed a bug in the sql

     ${jsonb_field} = coalesce(jsonb_field::jsonb,'{}'::jsonb)::jsonb || '{${updateObject.join(',')}}'::jsonb

The jsonb_field in the coalesce should also be ${jsonb_field} as we are trying to concatenate to the field.

I also added a stringify to the value so arrays can be in the JSON value.

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud