Orphan agreement holder records in ref_client + client_agreement cause duplicate RAN's on homepage
- Dominant language
- TypeScript
- Stars
- 9
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
In the rare event FTA doesn't send us a P or C for a given ref_client record, these are orphaned and result in extra primary agreement holder records in client_agreement, which then manifest themselves as duplicate RAN's, or in some rare cases RANs that show up for other range officers in other districts (this one was a loc_code of 3 )
Issue that's been there since original release to production, but only rearing it's head with more people using the site.
**Expected Behaviour**
There should never be a duplicate RAN on the home page, nor should a RAN show up for other staff.
**Actual Behaviour**
Duplicate RANS for records with orphan primary and RANS visible for the wrong people with loc_code's of 3.
**To Reproduce**
Put another ref_client record for the same ran, loc code's of 1 and 3 and view the home page.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.