FAO tenant village census backend contract#84
Open
pphetra wants to merge 20 commits into
Open
Conversation
- add tenant-scoped integration clients, webhooks, audit, idempotency, and risk storage - add report-submitted webhook delivery and external AI/risk/cluster REST APIs - add incident and census read APIs with focused integration tests
graphene-django 3.x + django-filter 23.x collapse an empty list passed to an `__in` filter to "match nothing", so a client sending `authorities: []` / `reportTypes: []` for an unselected multi-value filter got zero results instead of all. Add EmptyListInsensitiveFilterSet, which strips empty-list args before validation, and apply it to IncidentReportTypeFilter (covers incidentReports and boundaryConnectedIncidentReports) and CaseTypeFilter. Also harden child_authorities_filter in both: read self.data via .get() to avoid a KeyError once empty keys are stripped, and drop a stray debug print. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the backend pieces for the FAO Tenant Village Census MVP on the shared
feature/fao-pending-slicesbranch.Changes include:
VillageCensusSnapshotandAnimalCensusFactpersistenceanimalSpeciesquery for mobile/reportersValidation
pytest accounts/tests/test_animal_census_backend.py-> 12 passed, 2 warningspytest accounts/tests/test_animal_census_backend.py accounts/tests/test_village_capability.py accounts/tests/test_village_reporter_onboarding.py-> 28 passed, 2 warningspytest accounts/tests/test_animal_census_backend.py accounts/tests/test_village_capability.py accounts/tests/test_village_reporter_onboarding.py accounts/tests/test_admin_village_crud.py-> 39 passed, 2 warningspython manage.py check-> no issuesgit diff --check-> cleanNotes
Full
accounts/testsstill has the pre-existing unrelated OAuthhash_client_secretissue noted during the slice work. Manual browser/device smoke was not run in this closure pass.Companion PRs are expected in
ohtk-msandohtk-mobilefrom the same branch name.