AtlasOfLivingAustralia / specieslist-webapp

Species lists and traits tool
https://lists.ala.org.au
Mozilla Public License 2.0
6 stars 21 forks source link

Uploading data for an existing list sometimes results in duplicate entries #315

Open nickdos opened 1 month ago

nickdos commented 1 month ago

Reported by Amanda on Slack (link):

it looks like some lists (mostly the Northern Territory) are returning duplicate entries in the change list, and I’m wondering if there is some processing that is going on in the background that happens after I POST the list to test, and doesn’t finish before I generate the change list.

the change list should only have one species, and show one status update. This is an example for the Northern Territory.

image

According to the upload form, the previous data in the list should be deleted and completely replaced with the contents of the uploaded data/csv.

Note, this scenario is submitting the upload form programmatically (not using the API) and then doing a query just after, for the list contents. This might be causing some sort of race condition, if the name matching is still in progress when the second request arrives. As a dumb guess.

I did a manual upload to replace a small list of mine and I could not replicate the duplicate entries. Contact Amanda for more details in order to replicate this issue - her script reliably trigger this situation.