GEOLYTIX / xyz

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

Prevent update of ID field #1287

Closed simon-leech closed 1 month ago

simon-leech commented 1 month ago

In this PR - https://github.com/GEOLYTIX/xyz/pull/1283 We fixed an issue so you cannot update the layer qID. However, we also need to check on specifically editing an id field - as we use %{id} for the location ID.

If you have a location of qID 123 and want to update ID to 5 You would expect it to run

UPDATE X set field = 5 WHERE qID = 123

It will actually run

UPDATE X set field = 5 WHERE qID = 5

So this PR just checks on specifically editing an id field - as we use %{id} for the location ID, and prevents it.

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

RobAndrewHurst commented 1 month ago

Nice one @simon-leech