OpenTreeMap / otm-core

OpenTreeMap is a collaborative platform for crowdsourced tree inventory, ecosystem services calculations, urban forestry analysis, and community engagement.
www.opentreemap.org
Other
186 stars 88 forks source link

Cannot delete a tree if the tree ID field is hidden. #3265

Closed jwalgran closed 5 years ago

jwalgran commented 5 years ago

Expected: The tree is deleted and the planting site remains Actual: The API returns a 400 and the tree is not deleted.

This is where plotDetail.js is creating a delete URL by looking for the presence of the tree ID in the DOM.

https://github.com/OpenTreeMap/otm-core/blob/dc0428c468707a38ea41176204b527b1832e9a8d/opentreemap/treemap/js/src/lib/plotDetail.js#L31-L47

This is the root cause of https://github.com/OpenTreeMap/otm-clients/issues/439