BiologicalRecordsCentre / UKBMS-online

Issue tracking for UKBMS online recording site
2 stars 0 forks source link

Duplicated location_ID means unable to edit data entries for a site #324

Closed IanMiddlebrook closed 9 months ago

IanMiddlebrook commented 9 months ago

Hi @DavidRoy @JimBacon

We have a situation where an apparent duplication of a site/location_ID has made it impossible to edit entries for that site.

The site - Stoke Park, Bristol (location_ID 301909) - appears twice in the Site Assignment list for Somerset & Bristol branch: image Although it only appears once in Site Lists for individual recorders, or on the Annual Summary page, so the Site Assignment page is the only indication that there might be a problem.

However, if you try to edit and of the walk entries for this site, you get this message: image Some sample links for example: https://ukbms.org/input-data?sample_id=23774467 https://ukbms.org/input-data?sample_id=23226073

Please could we resolve this issue so that entries can be edited?

Many thanks, Ian

JimBacon commented 9 months ago

I don't have an explanation as to how this has arisen but the problem is caused by there being duplicate records in the locations_websites table. There was one other transect with the same problem, Bladnoch, with location_id = 320054. I have deleted the duplicates for both locations which relieves the issue.

Note, the created_on and created_by_id fields indicate that the problem was introduced at the time of creation of the locations. Each duplicate pair was created by the same user (but a different user for the two transects), separated by a few minutes.

IanMiddlebrook commented 9 months ago

That's great - thanks @JimBacon