Ensure that neighborhoods created as part of an AnalysisBatch job are matched with existing neighborhoods, even if they were created by a different user within the organization or if they don't have a fips_code that matches with the existing neighborhood's fips_code. Neighborhoods are now only matched on the fields defined in unique_together. Test cases added to validate AnalysisBatch neighborhood matching logic.
Demo
N/A
Notes
I'm running into some issues running ./scripts/test locally, but I am hopeful that the test cases will work as written. I'm continuing to troubleshoot this on my end - I have attached the output logs of this command here for review in case someone is able to assist in rectifying the issue here.
Testing Instructions
Path 1 (admin frontend)
Reload the servers with
vagrant ssh then ./scripts/update and ./scripts/server
Create a batch upload AnalysisJob from the admin frontend while logged in as the systems-pfb@azavea.com user
Create another user and log in as the newly created user
Create another batch upload AnalysisJob as the newly created user using the same shapefile - there should not be any new neighborhoods created as part of this second AnalysisJob
Overview
Ensure that neighborhoods created as part of an AnalysisBatch job are matched with existing neighborhoods, even if they were created by a different user within the organization or if they don't have a fips_code that matches with the existing neighborhood's fips_code. Neighborhoods are now only matched on the fields defined in unique_together. Test cases added to validate AnalysisBatch neighborhood matching logic.
Demo
N/A
Notes
I'm running into some issues running
./scripts/test
locally, but I am hopeful that the test cases will work as written. I'm continuing to troubleshoot this on my end - I have attached the output logs of this command here for review in case someone is able to assist in rectifying the issue here.Testing Instructions
Path 1 (admin frontend)
vagrant ssh
then./scripts/update
and./scripts/server
Path 2 (Django test suite)
vagrant ssh
then./scripts/update
Checklist
Resolves #795
django_test.log